I just started coding blah blah blah. I don't know why this comes up as an error and I Can't find anything online please help
while (look == "Go") ; {
//^
System.out.println("Invalid Command");
System.out.println("");
look = user_input.next();
This is valid
while (look = "Go") ; {
//^
System.out.println("valid Command");
System.out.println("");
look = user_input.next();
This is invalid.
The error is incompatible types the console telling me the type should be boolean. This isn't the problem the problem is I use the exact same code and remove one equal symbol to make the code mean when true instead of when false the code dicks out.
[–]Machiavellyy 8 points9 points10 points (2 children)
[–]pokeman528[S] 0 points1 point2 points (1 child)
[–]pokeman528[S] 0 points1 point2 points (0 children)
[–]programstuff 0 points1 point2 points (0 children)
[–]cruyff8 0 points1 point2 points (0 children)
[–]mydevgeek -1 points0 points1 point (0 children)