Yes: the equalsIgnoreCase()
method.
Let us modify the recursive definition of equals()
so that two strings are equal
if both strings are the same length, and both strings have the same
letters in the same position, but upper and lower case letters
are regarded as equivalent.
For example,
equalsIC( "X", "X" ) is true equalsIC( "X", "x" ) is true equalsIC( "X+++x", "x+++X" ) is true equalsIC( "StingRay", "stingRAY" ) is true
This is similar to the method equalsIgnoreCase()
of String
objects.
Complete the definition by selecting the correct option in each drop-down list.