You're using the tokenizer incorrectly (or at least, inefficiently). It implements the Enumerator interface (similar to Iterator) so
the nextToken advances automatically:



String s = "This is...