Advertisement
Guest User

Untitled

a guest
Jan 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. System.out.println("Type your username: ");
  2. String username1 = reader.nextLine();
  3.  
  4. System.out.println("Type your password: ");
  5. String password1 = reader.nextLine();
  6.  
  7. if (username1.equals("alex")) {
  8. if (password1.equals("mightyducks")) {
  9. System.out.println("You are now logged into the system!");
  10. if (!(username1.equals("alex"))) {
  11. if (!(password1.equals("mightyducks"))) {
  12. } else {
  13. System.out.println("Username or password is invalid!");
  14.  
  15. }
  16. }
  17. }
  18. }
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement