Suppose we have a program that requires authorization for use. To authorize, you need to enter the correct login, password, and answer at least one of the security questions correctly. Below is a piece of code that performs this check. You need to fill in the blanks so that the authorization conditions described above are implemented in the program
Boolean type and operations. True and false
Secure Login
Report a typo
Fill in the gaps with the relevant elements
...
if (login.equals("GalacticExplorer") password.equals("v3rYs3cR3t")
(answer1.equals("Blue") answer2.equals("New York") answer3.equals("Fluffy"))) {
System.out.println("Login successful! Welcome!");
} else {
System.out.println("Incorrect login, password or no security questions were answered correctly");
}
...Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.