This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes disecting a string 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 "disecting a string" Watch "disecting a string" New topic
Author

disecting a string

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
hi all,
can somebody tell me how to dissect the string into substrings..
String mystring = "how are you these days"
String string1 = "how"
String string2 = "are"
String string3 = "you"
String string4 = "these"
String string5 = "days"
it's urgent..
thanks
trupti
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
The best way is probably to use StringTokenizer using a space as the delimiter.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: disecting a string
 
Similar Threads
Cleared SCEA Part 2 & Part 3
Dates as String
Finding number of days in a month confusion
Cleared SCJP1.6 exam with 93%
To Publisher: how long wilst thou take to mail me a copy?