contains() method of Collection interface returns true if this set contains the specified element. But the problem is contains() method only check the equality of element (case sensitive).14 Tem 2019
Read moreIs set contains case sensitive?
Yes. Collection membership is case sensitive. This applies to Sets: If the set contains String elements, the elements are case-sensitive .
Read moreHow do you make a case insensitive in Java?
Java String equalsIgnoreCase() Method The equalsIgnoreCase() method compares two strings, ignoring lower case and upper case differences. This method returns true if the strings are equal, and false if not. Tip: Use the compareToIgnoreCase() method to compare two strings lexicographically, ignoring case differences.
Read more