logo

Java String EqualsIgnoreCase() Method


Show

Description

The equalsIgnoreCase() Method is utilized to contrast a particular String to the String, avoiding case deliberations. Two strings are deemed equivalent ignoring cases if they are of the identical length and matching characters in the two strings are the identical ignoring cases.

Syntax

Here is the syntax of this method:

public boolean equalsIgnoreCase(String anotherString)

Parameters

Here is the detail of parameters −

  • anotherString − the String to compare this String against.

Return Value

  • This method returns true if the argument is not null and the Strings are equal, ignoring case; false otherwise.

Example

This will produce the following result:

Output

Returned Value = true
Returned Value = true
Returned Value = true

Here at Intellinuts, we have created a complete Java tutorial for Beginners to get started in Java.