aspose file tools
The moose likes Beginning Java and the fly likes Stringtokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Stringtokenizer" Watch "Stringtokenizer" New topic
Author

Stringtokenizer

pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
while(st.hasMoreTokens())
{

/***here**/ value = st.nextToken();

}

/******* question*************/
how do i compare individual values stored in value variable?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
The StringTokenizer nextToken() method returns a String so you would use the String equals( String ) method.
NOTE: Not the == object identity method.
See the java.util.StringTokenizer javadocs.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Stringtokenizer
 
Similar Threads
What the hell is a serialized object?
How To Put Some Text In the Text Field?
Java uses Pass By Value or Reference
WA #1.....word association
logic:iterate inside logic:equal