I am Beginner in java ,I am just trying out to convert string into char array,though it is running fine on my System but on a competitive coding website it is throwing an error.Here is the link of that Question Exception in thread "main" java.lang.NullPointerException
Here is my piece of code I have used BufferedReader to take input:-
String s1;
s1= inp.readLine();
String s2;
s2=s1;
char ch1[] = s1.toCharArray();
char ch2[] = s2.toCharArray();
Please help!