I've tried numerous ways to fix this but I'm just not having any luck. I've heard you get the error by making a null.equals(null) but I set the value before it got inputted. I'm just really lost, can someone explain this? Here is my code:
public static void main(String[] args) {
String MenuChoice = "";
String MenuOption = "nothing";
System.out.println("Welcome to my Fashion!");
System.out.println("\n");
System.out.println("Are You Signing In As An <Employee> Or <Admin>?");
MenuChoice = inputData.next();
MenuOption = MenuChoice;
if(MenuOption.equals("Employee")) {
Passwords.MainPassword();
}
if(MenuOption.equals("Admin"));
{
Passwords.AdminPassword();
}
}
My code is not a duplicate because I am involving strings, not variables. Also, only asking about .equals.