daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static String input(String prompt)
  2.     {
  3.         String inputLine = "";
  4.         System.out.print(prompt);
  5.         try
  6.         {
  7.             java.io.InputStreamReader sys = new java.io.InputStreamReader(
  8.                     System.in);
  9.             java.io.BufferedReader inBuffer = new java.io.BufferedReader(sys);
  10.             inputLine = inBuffer.readLine();
  11.         }
  12.         catch (Exception e)
  13.         {
  14.             String err = e.toString();
  15.             System.out.println(err);
  16.             inputLine = "";
  17.         }
  18.         return inputLine;
  19.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top