public static String getInput ( String prompt ) { System . out . print ( prompt ) ; try { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; return in . readLine ( ) ; } catch ( IOException e ) { return null ; } }
Displays a prompt and then reads in the input from System . in .