import java.io.*;

/**
 * Echo3.java
 * <br>
 * A class to demonstrate terminal I/O.
 * <br>
 * Created: Fri Feb  7 07:49:50 2003
 *
 * @author <a href="mailto:shapiro@cse.buffalo.edu">Stuart C. Shapiro</a>
 */

public class Echo3 {

    /**
     * A demonstration of a Read/Print loop,
     * and the recognition of IOException.
     *
     * @param args a <code>String[]</code> 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));
	while (true) {
	    System.out.print("Say something (\"Bye\" to end): ");
	    input = reader.readLine();
	    if (input == null || input.equals("Bye")) break;
	    System.out.println("You said =>" + input + "<=");
	} // end of while (true)
	System.out.println("Goodbye.");
	
    } // end of main ()
    
    
}// Echo3
