Hey guys im making a simple program. I have a while loop that continues while the bool quit ! = true. I am trying to test that in a statement like this:
String userdecision = "";
while (quit!=true){ //start while
System.out.print("Would you like to continue with another transaction?");
[B]userdecision=in.next();[/B]
if (userdecision=="no"){
quit = true;
}
} //end while loop
There is something going wrong. I think it's the part i put in bold. I don't think i have the right syntax for getting the users input and then breaking out of the program. I have all the java utils imported into the project and i am using scanner to get the input from the user. Can anybody help me with the right syntax for this. THanks.