Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. System.out.println("Please enter your username:");
  4. Scanner username = new Scanner(System.in);
  5. System.out.println("Hello " + username.nextLine() + ", please authenticate using your password:");
  6. Scanner password = new Scanner(System.in);
  7. String pw = "test";
  8. String pwEnter = password.nextLine();
  9. if (pw != pwEnter) {
  10. System.out.println("Sorry, you don't have access to the System.");
  11. } else {
  12. System.out.println("Thank you for authenticating, you can proceed with:");
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement