posted 20 years ago
From K.S.
In the equals() contract you can find
"if you override equals(),override hashCode() as well" but on hashCode() contract nothing about this "override dependency" but On "Collections" tests I found "by contract hashCode() & equals() can't be overridden unles both are overridden".
Is this true :
override equals() => override hashCode() & override hashCode() => override equals()
SCJP, SCJD, SCWCD, OCPJBCD