}

Equality Index Page 1

Which is the proper way to compare strings in Java?

When comparing string in java you could get confused with unexpected result using ==. Should you use equals() in java to compare strings?