[Solved] What’s wrong with == operator on java string [duplicate]

[ad_1]

== compares references not the content

To compare strings you need to use String#equals:

.equals(); //If you  consider the case
.equalsIgnoreCase(); //If you not consider the case  

0

[ad_2]

solved What’s wrong with == operator on java string [duplicate]