Robert

14%
Flag icon
When the hashCode method is invoked on an object repeatedly during an execution of an application, it must consistently return the same value, provided no information used in equals comparisons is modified.
Robert
Hmm, something I haven't questioned before: If information in the object does change that changes its equals & hashcode, a `get` on the new value will fail, right? Because the object will still be in the old hashcode's bucket. I wonder how much this has actually bitten people...
Effective Java
Rate this book
Clear rating
Open Preview