home *** CD-ROM | disk | FTP | other *** search
/ Sams Teach Yourself C in 21 Days (6th Edition) / STYC216E.ISO / mac / Examples / Day25 / InputOutputTest.java next >
Text File  |  2002-05-25  |  511b  |  20 lines

  1. import java.lang.System;
  2. import java.io.InputStreamReader;
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5.  
  6. public class InputOutputTest {
  7.  
  8.     public static void main(String args[]) throws IOException {
  9.     // Set up to read lines from the keyboard.
  10.     BufferedReader kb;
  11.     String s1;
  12.  
  13.     kb = new BufferedReader(new InputStreamReader(System.in));
  14.     System.out.println("Enter a line of text: ");
  15.     s1 = kb.readLine();
  16.     System.out.println("You entered " + s1);
  17.  
  18.     }
  19. }
  20.