Answer the question
In order to leave comments, you need to log in
What is the error in checking the value?
Hello. How is it that the break command is not executed?
This is when debugging a specific line
And this is the next step of the cycle
It is not quite visible on the screenshot, break comes after the if
Answer the question
In order to leave comments, you need to log in
I haven't written in java for a long time, but something tells me that strings cannot be compared through the == operation. It is necessary through the equals method. The thing is that the strings can be the same, but they are represented by different objects in memory. The == operator will return false if the objects are different, even if they have the same content.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question