import java.io.*;
/**
* Echo2.java
*
* A class to demonstrate terminal I/O.
*
* Created: Fri Feb 7 07:49:50 2003
*
* @author Stuart C. Shapiro
*/
public class Echo2 {
/**
* A demonstration of a Read/Print loop,
* and the recognition of IOException.
*
* @param args a String[]
value
* @exception IOException if an error occurs
*/
public static void main (String[] args) throws IOException {
String input;
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
System.out.print("Say something (\"Bye\" to end): ");
while (!((input = reader.readLine()) == null
|| input.equals("Bye"))) {
System.out.println("You said =>" + input + "<=");
System.out.print("Say something (\"Bye\" to end): ");
} // end of while (true)
System.out.println("Goodbye.");
} // end of main ()
}// Echo2