Could StringTokenizer
be used to write the scanner?
Yes, but using it might not be any easier. The problem is the tag tokens that have spaces and punctuation inside of them.
The best way to write this program is to use the Java regular expression package, which is the subject of chapters ten and eleven.
You have reached the end this chapter.