Can anyone fix this? What's wrong with my code? Accepts username and password as "admin"
System.out.print("Enter Username: ");
String user=myinput.readLine();
if (user=="admin") {
System.out.print("Enter Password: ");
String pass=myinput.readLine();
if (pass=="admin") {
statement(s)
} else if (pass!="admin") {
System.out.println("Invalid Password.");
}
} else if (user!="admin") {
System.out.println("Invalid Username.");
}