Thread Closed

Java Question

 
Share Thread Thread Tools
Feb13-06, 08:57 PM   #1
G01
 
Recognitions:
Gold Membership Gold Member
Homework Helper Homework Help

Java Question


I need java to read a string and count how many characters are in it. I know theres some class that can do this. What is it?
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Heat-related deaths in Manhattan projected to rise
>> Dire outlook despite global warming 'pause': study
>> Sea level influenced tropical climate during the last ice age
Feb13-06, 09:01 PM   #2
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
"Read a string?" From standard input?

Use e.g.

String s = System.in.readLine();
int n = s.length();

- Warren
 
Feb14-06, 10:15 PM   #3
G01
 
Recognitions:
Gold Membership Gold Member
Homework Helper Homework Help
Thanks alot.
 
Thread Closed
Thread Tools


Similar Threads for: Java Question
Thread Forum Replies
JLabel java question. Engineering, Comp Sci, & Technology Homework 1
a question about binary tree(java) Programming & Comp Sci 2
question about this java program Programming & Comp Sci 6
Java Question Programming & Comp Sci 2
Java question Programming & Comp Sci 5