String password = "let me in"; Scanner scanner = new Scanner(System.in); String guess; do { System.out.println("Guess the password:"); guess = scanner.nextLine(); }while(!guess.equals(password);
String password = "let me in"; Scanner scanner = new Scanner(System.in); String guess; do { System.out.println("Guess the password:"); guess = scanner.nextLine(); }while(!guess.equals(password);