//take the input from user
text = br.readLine();
//convert to char array
char ary[] = text.toCharArray();
System.out.println("initial string is:" + text.toCharArray());
System.out.println(text.toCharArray());
Ausgang:unterschiedliches Verhalten von println() in Java
initial string is:[[email protected] abcd
+1. Das ist die richtige Antwort. –
danke für die klare Erklärung – dev