How do you use equalsIgnoreCase?

The equalsIgnoreCase() method of the String class compares two strings irrespective of the case (lower or upper) of the string . This method returns a boolean value, true if the argument is not null and represents an equivalent String ignoring case, else false. Syntax: str2.

Read more

What is compareToIgnoreCase?

The compareToIgnoreCase() method compares two strings lexicographically, ignoring lower case and upper case differences . The comparison is based on the Unicode value of each character in the string converted to lower case. The method returns 0 if the string is equal to the other string, ignoring case differences.

Read more