I ve been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.
Is == bad? When should it and should it not be used? What s the difference?
Sommaire |
I ve been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.
Is == bad? When should it and should it not be used? What s the difference?
License : cc by-sa 3.0
http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java