Which method is used to compare two strings?

The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings.

Sizin İçin Seçtik  How do you implement equals in Java?

Leave a Reply

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