Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stringtokenizer  RSS feed

 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!