Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- System.out.println("Please enter your username:");
- Scanner username = new Scanner(System.in);
- System.out.println("Hello " + username.nextLine() + ", please authenticate using your password:");
- Scanner password = new Scanner(System.in);
- String pw = "test";
- String pwEnter = password.nextLine();
- if (pw != pwEnter) {
- System.out.println("Sorry, you don't have access to the System.");
- } else {
- System.out.println("Thank you for authenticating, you can proceed with:");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement