Terminal Input

The class Console contains methods for terminal I/O. Type-specific methods read characters, integers, doubles, and strings. Another method pauses output and waits for the user to hit the enter key to continue. Examples:

   char letter = Console.readChar("Enter a letter: ");
   double d = Console.readDouble("Enter a real number: ");
   int i = Console.readInt("Enter an integer: ");
   String name = Console.readLine("Enter your full name: ");
   Console.pause();
 

See the Help page for more details.