Reading sequence of characters in Java-----HELP!!!
807599Feb 10 2007 — edited Feb 11 2007I need help with this program here..Im new to Java and struggling to get this to work..here's the problem..
The program monitors a possibly infinite stream of characters from the keyboard (standard input). If it detects the sequence "www" it outputs a "0". If it detects the sequence "wow" it outputs a "1". DO NOT detect sequences within sequences. The program should exit cleanly when it detects an End Of Input. For example:
The following sequence wwowowwwowww<End Of Input> would produce the following result: 100
While the following sequence wwwowowwwwoowowow<End Of Input> would produce the following result: 0101