Java String equalsIgnoreCase example

String’s equalsIgnoreCase method is similar to equals method but it ignores case. So if Strings have different cases, then also it will considered as equals.

For example:

str1.equalsIgnoreCase(str2) will return true.

Method Signature:

String equalsIgnoreCase Example:

When you run above program, you will get below output:

Add Comment