Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public static void printLogin() {
  2. int tries = 0;
  3. int level = 0;
  4.  
  5. String username = "";
  6. String password = "";
  7.  
  8. do {
  9. System.out.println("Username:");
  10. username = Functions.getString();
  11.  
  12. System.out.println("Password:");
  13. password = Functions.getString();
  14. tries++;
  15. if (tries > 3){
  16. System.out.println("You tried too many times.");
  17. System.exit(1);
  18. }
  19. level = Functions.login(username, password);
  20. } while (!(level >= 1 && level <= 2));
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement