String compare To Ignore Case

compareToIgnoreCase() String Example

java.lang.String class comes with many methods to check two strings contain same characters in the same sequence. To do this, String class comes with equals(), compareTo(), equalsIgnoreCase() and compareToIgnoreCase() methods. This is tutorial is on compareToIgnoreCase() String. We have seen earlier compareTo() method which does case-sensitive comparison lexicographically. Now we…