- Standard input/console input - Method of obtaining input via the console - System.in - The object used to perform standard input - Instance of InputStream class - Can only read one byte at a time - InputStreamReader - Read a single character at a time - BufferedReader - Read a single line that consists of multiple characters at a time - Associate with System.in: import java.io.*; ... BufferedReader bufReader; bufReader = new BufferedReader( new InputStreamReader(System.in) ); - readLine method - Reads until the Enter key is pressed - No visual cue of expectation automatically provided - Echo printing: Standard output window echoes input characters back to user - Can erase characters before pressing Enter via the backspace key - By default returns a String - Must use wrapper classes to parse into other data types - Exception: error condition - Magic for now - Must add "throws IOException" to any method using the readLine method - By doing this in the method declaration, pass on handling to the system - Instance of IOException class represents IO exception - Will cause a compiler error if you don't handle it in some way - Method has thrown an exception when executing it causes an exception Quick Check: 1. int height; String input; BufferedReader bufReader; bufReader = new BufferedReader( new InputStreamReader( System.in ) ); System.out.print("Enter your height in inches: "); input = bufReader.readLine(); height = Integer.parseInt(input); 2. double weight; String input; BufferedReader bufReader; bufReader = new BufferedReder( new InputStreamReader( System.in ) ); System.out.print("Enter your weight in pounds: "); input = bufReader.readLine(); weight = Integer.parseInt(input); weight = weight * 453.592 / 1000; System.out.println("You weigh " + weight + "kilograms.");