The String equalsIgnoreCase() method compares the two given strings on the basis of content of the string irrespective of case of the string. It is like equals() method but doesn't check case. If any character is not matched, it returns false otherwise it returns true
public boolean equals(Object anotherObject)
anotherObject : another object i.e. compared with this string.
true if characters of both strings are equal otherwise false.
equals() method of java Object class.