Is the compareTo method case sensitive?

As you can see that the output is not zero, which means that compareTo() method is case sensitive . However we do have a case insensitive compare method in string class, which is compareToIgnoreCase(), this method ignores the case while comparing two strings.

Sizin İçin Seçtik  How do you lowercase a letter in java?

Leave a Reply

Your email address will not be published. Required fields are marked *