Java String equalsIgnoreCase() method

equalsIgnoreCase() method compares two Strings based on the their content but ignore the case.

Syntax 

Parameter

anObject: Object to be compared with the current String without case consideration.

Returns

It returns true when the current String is equivalent to the given String without case consideration Otherwise, it returns false

Java String equalsIgnoreCase() Example1:

Output: 

 Java String equalsIgnoreCase() Example2:

Output:

Leave a Comment