The compareToIgnoreCase() method is utilized to compare two strings like compareTo method but here the case (upper or lowercase) difference is ignored while comparing.
Method Definition:int compareToIgnoreCase(String str)
Return Type:It is same as compareTo() method but here only case difference is ignored.
Here, also both the strings are considered same even if there is a case difference.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.