Is string comparable Java?

Java String compare. We can compare String in Java on the basis of content and reference . It is used in authentication (by equals() method), sorting (by compareTo() method), reference matching (by == operator) etc.

Sizin İçin Seçtik  What is one difference between the == operator and the equals object method?

Leave a Reply

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