StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the
String or the
java.util.regex package instead.
String.split() returns an array (String) and Tokenizer returns one token at a time.