I have written following code so far:
Scanner scanit = new Scanner(System.in);
String strscan = scanit.nextLine();
int x = strscan.length();
int y = strscan.charAt(x/2);
Because of some reason when I am trying to run above code it is giving me the error.
Please let me know if somebody can help in resolving the issue!
I am very new to java and I only have the basic knowledge in Java. I don't know about the use of arrays and other advanced stuff. If someone can tell me how to resolve this issue in the easiest way possible that would be the great help!