Comparing strings in a case insensitive manner means to compare them without taking care of the uppercase and lowercase letters. To perform this operation the most preferred method is to use either toUpperCase() or toLowerCase() function . toUpperCase() function: The str.
Read moreIs String comparison case-sensitive in java?
Use the equals() method to check if 2 strings are the same. The equals() method is case-sensitive , meaning that the string “HELLO” is considered to be different from the string “hello”.
Read more