String str1 = "Hello"; String str2 = "hello"; boolean isSame = StringUtils.equalsIgnoreCase(str1, str2); System.out.println(isSame); //Output: true
String str1 = null; String str2 = null; boolean isSame = StringUtils.equalsIgnoreCase(str1, str2); System.out.println(isSame); //Output: trueIn this example, we are comparing two null strings using the equalsIgnoreCase method. Since both the strings are null, the method returns true. The package library used in this example is the org.apache.commons.lang3 package.