problem with while statement :(
i am having a problem with my while statement, can anyone help me to get it working :(
i am trying to get the while statement to only run when the input hasnt been a yes or a no, can someone please help me.
System.out.print("Are you a Resident? (yes/no): ");
Resident = console.next();//Requests resident status from user and puts in in Resident
while ((Resident !="yes") && (Resident !="no"))
{
System.out.print("error - You didnt type yes or no. Try again: ");
Resident = console.next();
}

