my dog learned polymorphism*
The moose likes Beginning Java and the fly likes String Reading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String Reading" Watch "String Reading" New topic
Author

String Reading

thippareddy mallikarjuna reddy
Greenhorn

Joined: Mar 08, 2006
Posts: 19
Hi Pals,


I have written one jsp.
I want read strings from textarea which are separated by cama.

Example : the string like this.

Airport Parking,Virus Software,Export Data,Hardware

i want stings like:
1.Airport Parking
2.Virus Software
3.Export Data
4.Hardware


Thanks
Mallikarjuna
[ June 05, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Nothing JSP-specific about this. So moved to the Java in General (beginnner) forum.

Hint: check out the methods on the String class for methods that might help you in this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
vijaya vinayagam
Greenhorn

Joined: Dec 09, 2005
Posts: 21
Hi,
in String class you have a split method using that split the String based upon "," and get individual Strings.
Kia Phia Ben
Ranch Hand

Joined: Dec 16, 2005
Posts: 48
You can using StringTokenizer.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: String Reading
 
Similar Threads
string reading
[Humor] New Computer Viruses
reading a .xsl file using sax
string reading
why the hell virus is developed!!!!!!