wiley_pastebin

bufferedreader 2

Mar 15th, 2019
3,262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. //...
  2.  private void demoInput() {
  3.   System.out.println("Insert some text: ");
  4.   try {
  5.    userin = br.readLine();
  6.   } catch (IOException e) {
  7.   System.out.println("Something went wrong!");
  8.   return;
  9.  }
  10.  
  11.  System.out.println("You said: " + userin);
  12. } while(!userin.equals("quit"));
  13.  } 
  14.  //...
  15. }
Advertisement
Add Comment
Please, Sign In to add comment