import java.io.*;

/**
 * Echo.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 Echo {

    /**
     * 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));
	System.out.print("Say something (\"Bye\" to end): ");
	input = reader.readLine();
	while (!(input == null || input.equals("Bye"))) {
	    System.out.println("You said =>" + input + "<=");
	    System.out.print("Say something (\"Bye\" to end): ");
	    input = reader.readLine();
	} // end of while (true)
	System.out.println("Goodbye.");
	
    } // end of main ()
    
    
}// Echo
