How do you make two objects equal in Java?

Java determines equality with the equals(Object o) method – two objects a and b are equal iff a. equals(b) and b. equals(a) return true . These two objects will be equal using the base Object definition of equality, so you don’t have to worry about that.

Sizin İçin Seçtik  Is Java object clone () deep copy?

Leave a Reply

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