Guest User

Untitled

a guest
Jan 13th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  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.
Add Comment
Please, Sign In to add comment