Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Password {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String userName = scan.nextLine();
- String passWord = scan.nextLine();
- String enterPassword = scan.nextLine();
- while (!enterPassword.equals("password")){
- enterPassword= scan.nextLine();
- }
- System.out.println("Welcome " + userName + "!");
- }
- }
Add Comment
Please, Sign In to add comment