Tuesday, May 16, 2006

hash code as key

avoid using object's hash code as key in a map or any caching facility. two or more objects can have the same value for hash code at the same time. when the .equals returns false, it does not mean that there will be always 2 distinct hash code values.

No comments: