when the above code is executed then it is showing that m string is undefined, please tell how to modify a string ,which is taken as input
String m;
BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
try {
m = x.readLine();
}
catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
a--;}
index=m.indexOf('a',2);