Awesome, thank you. I'll code that in real quick and mark this post resolved if it solves the problem. Of course, I'm still curious why it wouldn't even compile. What I wrote seems like it would be an expression, even if it wouldn't 'work'.

Michael Rippee wrote:Awesome, thank you. I'll code that in real quick and mark this post resolved if it solves the problem. Of course, I'm still curious why it wouldn't even compile. What I wrote seems like it would be an expression, even if it wouldn't 'work'.

What you wrote ...

is not valid Java. And hence, doesn't compile. Java follows very specific rules that is specified by the JLS -- it is probably better to learn those rules, than to determine it via "seems like" it should work.

This is logically equivalent to what you seem to be getting at. That is, if reply doesn't equal "Yes", code is not going to loop, period. What you wrote is invalid syntax if you meant to stipulate two (unnecessary) conditions for "reply". As was previously suggested, use "equals" for string comparison. With objects in general, "==" only checks for same reference (memory address)..