Java String equalsIgnoreCase()

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.


Internal implementation


Signature


Parameter

str : another string i.e. compared with this string.


Returns

It returns true if characters of both strings are equal ignoring case otherwise false.


Java String equalsIgnoreCase() method example

Test it Now
true
true
false

Java String equalsIgnoreCase() Method Example 2

Let's see an example where we are testing string equality among the strings.

Output:

Mukesh kumar is present




Contact US

Email:[email protected]

equalsIgnoreCase()
10/30