G01 Science Advisor Gold Member Messages 2,709 Reaction score 19 Thread starter Feb 13, 2006 #1 I need java to read a string and count how many characters are in it. I know there's some class that can do this. What is it?
I need java to read a string and count how many characters are in it. I know there's some class that can do this. What is it?
chroot Staff Emeritus Science Advisor Gold Member Messages 10,270 Reaction score 45 Feb 13, 2006 #2 "Read a string?" From standard input? Use e.g. String s = System.in.readLine(); int n = s.length(); - Warren
"Read a string?" From standard input? Use e.g. String s = System.in.readLine(); int n = s.length(); - Warren