String comparison

There are many ways to do String comparison or equality check in Java 1. By using == operator 2. By using equals() method 3. By using equalsIgnoreCase() method 4. By using compareTo() method By using “==” operator == operator always compares object’s references not the object content. So, whenever we compare 2 strings using == […]

Share this article on