import java.io.*; // KeyboardInput.class reads a line of text from standard keyboardInput, class KeyboardInput { public static void main (String args[]) { String keyboardInput = ""; boolean inputError; InputStreamReader inputStreamReader = new InputStreamReader(System.in); BufferedReader bufferedReader = new BufferedReader(inputStreamReader); do { inputError = false; System.out.print ("Input the text line > "); System.out.flush (); try { keyboardInput = bufferedReader.readLine(); } catch (IOException e) { System.out.println ("An keyboardInput inputError was caught"); inputError = true; } } while (inputError); System.out.println ("The text line is: "+keyboardInput); } } [EMAIL PROTECTED] wrote: > > Hello everybody, > > Have you got any example like that? It's because there are so many > classes in java.io that I don't know what to choose to do it. > > Thanks a lot. > > ---------------------------------------------------------------------- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]