Java String equalsIgnoreCase example

Previous
Next

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:

Previous
Next

Add Comment