Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Simple quesiton
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Neospud




PostPosted: Tue Oct 17, 2006 5:07 pm   Post subject: Simple quesiton

Qucik question, say in java that i wanted to have the user imput a string with n number of letters. How would i make each word they entered it's own string. I already have my delimiter set up.
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Tue Oct 17, 2006 5:36 pm   Post subject: (No subject)

There are two classes that you could look at, String and StringTokenizer. To help you out, here's a link to the String documentation, which contains a method which does what you ask. I'll leave it up to you to find out which one that is. Also, use more descriptive topic names in the future.

Keep in mind that you could do this without using any specialized methods, but why reinvent the wheel, right? Wink
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: