0
Why can't i break out of this while loop?
I have been playing around with Java and I can't seem to break out of the while loop. I have tried using while and do-while loop, both with and without if statements and I keep getting the same issue. the code runs without any error. any help? https://code.sololearn.com/caf4mpt1aKio
3 Respuestas
+ 2
For Strings use the equals method:
choice.equals("stop") returns true if you enter stop.
+ 3
There is no direct String comparison in Java. For that you should always use equals() method.
+ 2
Please write your code in Sololearn Playground and share that link here so we can check that.