On 3/31/09 7:25 AM, "Nicholoz Koka Kiknadze" <kikna...@gmail.com> wrote:
> Hm, I usually override equals. Any advantages with hashCode? Just an FYI, if you override equals(), you should almost always override hashcode as well. From the Object.equals Javadoc API: "Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes." Check out Josh Bloch's "Effective Java" for a detailed explanation. Cheers, Chris