StringTokenizer? Convert the String to a char[] and iterate over that? Something else?
I wouldn't use StringTokenizer as it is one of classes in the JDK that's legacy.
The javadoc says:
StringTokenizeris 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 split method ofStringor thejava.util.regexpackage instead.