"Friends, Romans, countrymen"
Here is the near-complete implementation. The tricky parts with the buffer are not finished. Decide what to do (look at the previous page), then click to see if you are correct.
There is no reject state because there is a transition
out of every state for
all input characters.
On the transition from state 1 to state 2, the buffer is initialized to
contain the white space character in current
that caused the transition:
buffer = "" + current;
The empty string ""
is used so that there is a string object to
append the character to.
How many times are new objects created when this method is run?