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


== 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

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