length()
Posted: Wed May 10, 2023 3:18 pm
String str = "hello\r\n" + "world";
System.out.println(str.length());
why is answer 12?
hello and world should be 10 in total.
so which of the characters (\r\n) are not counted?
System.out.println(str.length());
why is answer 12?
hello and world should be 10 in total.
so which of the characters (\r\n) are not counted?