How does the equals method work in Java?

In Java, the String equals() method compares the two given strings based on the data/content of the string . If all the contents of both the strings are the same, it returns true. If all characters are not matched, then it returns false.

Sizin İçin Seçtik  What are different types of method in Java?

Leave a Reply

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