Advertisement
williamlangdoc

Untitled

Oct 18th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class justMessinRound {
  3. public static void main(String args[]) {
  4. Scanner input = new Scanner(System.in);
  5. System.out.println("enter your user id");
  6. String theirUsername = input.next();
  7. System.out.println("enter your password");
  8. String theirPassword = input.next();
  9. String theUsername = "williamlangdoc";
  10. String thePassoword = "102703";
  11. if (theirUsername.equals(theUsername) && theirPassword.equals(thePassoword)) {
  12. System.out.println("Welcome");
  13. } else {
  14. if (theirPassword.equals(thePassoword)) {
  15. System.out.println("incorrect username");
  16. }
  17. else
  18. {
  19. if (theirUsername.equals(theUsername))
  20. {
  21. System.out.println("incorrect password");
  22. }
  23. else
  24. {
  25. System.out.println("error");
  26. }
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement