Name: ddT132432 Date: 09/20/2001
C:\>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
It is easy to override Object's equals method without overriding Object's
hashCode method and thereby break the subclass's ability to be used as a key in
a Hashtable. The documentation of the equals method should make reference to
the fact that you may need to override the hashCode method.
(Review ID: 132322)
======================================================================
- duplicates
-
JDK-4215272 (Mostly) undocumented interaction between hashCode and equals in HashSet
-
- Resolved
-