// ConsoleTest.java // Test routine for ConsoleIn class // ConsoleIn.class must be in the same directory as class that invokes the // methods readLineInt(), readLineFloat(), readLineDouble(), and readLine(). /** * @author R. Ciminero * @version 10-02-00 Original Definitions */ public class ConsoleTest { public static void main( String args[] ) { int integerValue; float floatValue; double doubleValue; String stringValue; System.out.println("Console Class Test Routine"); System.out.print("Input (int): "); integerValue = ConsoleIn.readLineInt(); System.out.print("Input (float): "); floatValue = ConsoleIn.readLineFloat(); System.out.print("Input (double): "); doubleValue = ConsoleIn.readLineDouble(); System.out.print("Input (string): "); stringValue = ConsoleIn.readLine(); System.out.println(); System.out.println("ConsoleTest Output"); System.out.println("integer = " + integerValue); System.out.println("float = " + floatValue); System.out.println("double = " + doubleValue); System.out.println("string = " + stringValue); } }