java.util.StringTokenizer (JDK 1.0)
This class, when instantiated with a String, breaks the string up into tokens separated by any of the characters in the specified string of delimiters. (For example, words separated by space and tab characters are tokens.) The hasMoreTokens() and nextToken() methods can be used to obtain the tokens in order. countTokens() returns the number of tokens in the string. Note that StringTokenizer implements the Enumeration interface, so you may also access the tokens with the familiar hasMoreElements() and nextElement() methods.
When you create a StringTokenizer you may specify a string of delimiter characters to use for the entire string, or you may rely on the default whitespace delimiters. You may also specify whether the delimiters themselves should be returned as tokens. You may optionally specify a new string of delimiter characters when you call nextToken().
public classStringTokenizerextends Object implements Enumeration { //Public ConstructorspublicStringTokenizer(Stringstr, Stringdelim, booleanreturnTokens); publicStringTokenizer(Stringstr, Stringdelim); publicStringTokenizer(Stringstr); //Public Instance Methodspublic intcountTokens(); public booleanhasMoreElements(); //From Enumerationpublic booleanhasMoreTokens(); public ObjectnextElement(); //From Enumerationpublic StringnextToken(); public StringnextToken(Stringdelim); }