// Example of Java console I/O using BufferedReader class and parse routines

import java.io.*;

class ioexample 
{
   public static void main(String argv[])
   {
      String s;
      int i;
      double d;
        
      BufferedReader in
          = new BufferedReader(new InputStreamReader(System.in));

      try  // for in.readLine
      {
         // Read an integer
         System.out.print("Enter an int: ");            
         s = in.readLine();
         i = Integer.parseInt(s);

         // Read a double
         System.out.print("Enter a double: ");
         s = in.readLine();
         d = Double.parseDouble(s);

         // Print out results
         System.out.println("The integer is: " + i);
         System.out.println("The double is: " + d);
      }
      catch(java.io.IOException e1)
      {
         System.err.println("IO Exception");
      }
   }  // end main
}  // end ioexample
