According to NormR1's suggestion,
(1) Add one space character as an extra delimiter into the sDelim string in line 8:
String sDelim = ".? !";
(2)Insert the following line of code after line 14
if (s1.compareTo("do")!=0)
so that the "do" will not be printed on DOS