daily pastebin goal
96%
SHARE
TWEET

Untitled

a guest Jan 13th, 2018 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while (loop == true) {
  2.         Scanner s = new Scanner(System.in);
  3.         String a = s.nextLine();
  4.         String in = a;
  5.         info("User input: " + in, "DEBUG", 0);
  6.         if (in == "kill") {
  7.             info("Are you sure you would like to kill the running instance? [Y/N]", "CONSOLE", 0);
  8.             if (in == "Y" || in == "y") {
  9.                 info("Starting KILL method.", "CONSOLE", 0);
  10.                 s.close();
  11.                 loop = false
  12.             } else if (in == "N" || in == "n") {
  13.                 info("Cancelled.", "CONSOLE", 0);
  14.             } else {
  15.                 info("Illegal arguements given. Cancelled.", "CONSOLE", 0);
  16.             }
  17.  
  18.         } else {
  19.             info("Illegal Arguements given.", "CONSOLE", 0);
  20.         }
  21.  
  22.     }
  23.    
  24. [info @ DEBUG/0]> User input: kill
  25. [info @ CONSOLE/0]> Illegal Arguements given.
RAW Paste Data
Top