How to compare two objects in java example?
Answers
Answered by
3
Comparing for value equality
To be able to compare two Java objects of the same class the boolean equal method must be overriden and implemented by the class.
The implementor decides which values must be equal to consider two objects to be equal.
To be able to compare two Java objects of the same class the boolean equal method must be overriden and implemented by the class.
The implementor decides which values must be equal to consider two objects to be equal.
Similar questions