Why equals method used for?

The equals method in Java is invoked every time an object is compared with another object to see if they are equivalent to each other or not i.e. are they the same object in terms of data type and value.

Sizin İçin Seçtik  What is difference between and == in Java?

Leave a Reply

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