equals() using to comparison, refers to equivalence relations. hashCode() is id number allocated to an object by JVM. Contract: When you use equals() and hashCode() methods is necessary to override these methods
-- If two objects are equal then they should have the same hascode but the reverse is not true (i.e. If two objects have the same hashcode does not mean that they are equal)
-- You need to use the same attributes in your equals & hashCode methods
Besides checking about the implications of equals and hashcode values, the exam may simply ask that if you implement equals() method, which other method you should implement?
SCJP 96% | SCWCD 90%| SCJP mock exams | My SCJP blog
My pie came with a little toothpic holding up this tiny ad: