Question: Consider the following set of code: String password = Clash!16; Scanner getEntry = new Scanner(System.in); System.out.println(Enter your password: ); String userEntry = getEntry.nextLine(); if( /*
Consider the following set of code: String password = "Clash!16"; Scanner getEntry = new Scanner(System.in); System.out.println("Enter your password: "); String userEntry = getEntry.nextLine(); if( /* MISSING CODE */ ) System.out.println("Login Successful!"); else System.out.println("Login Failed!"); What code should replace /* MISSING CODE */ in this class so that it operates correctly?
userEntry=password
getEntry=password
userEntry==password
getEntry==password
userEntry.equals(password)
getEntry.equals(password)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
