How do you compare strings?

The compareTo() method compares the Unicode value of each character in the two strings you are comparing . compareTo() returns 0 if the string is equal to the other string, less than 0 if the string has fewer characters than the other string, and greater than 0 if the string has more characters than the other string.21 Tem 2020

Sizin İçin Seçtik  How do you know if an object is equal?

Leave a Reply

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