This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Servlets and the fly likes Alternative to StringTokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Alternative to StringTokenizer " Watch "Alternative to StringTokenizer " New topic
Author

Alternative to StringTokenizer

Bhushan Shete
Greenhorn

Joined: Mar 20, 2001
Posts: 9
Is there any alternative ( other than substring ) that can be used instead of StringTokenizer ???
Actually, I am facing a problem with StringTokenizer. If I have a string with a character '=' in it, then the following code results in false tokens :
StringTokenizer valToken = new StringTokenizer(val,"==>");
while(valToken.hasMoreTokens())
{
valno = valToken.nextToken();
valdate= valToken.nextToken();
}

Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
This is not really a servlets and JSP question, so I've moved it to Java in General (intermediate)


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
Don't get me started about those stupid light bulbs.
 
subject: Alternative to StringTokenizer