[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hashCode question (was Re: Silly Java question)

From: Per Bothner
Subject: Re: hashCode question (was Re: Silly Java question)
Date: Tue, 27 Dec 2005 10:26:08 -0800
User-agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324)

Michael Barker wrote:
Given that the toString() must be the same in order to be equal

Huh?  I don't believe there is any such requirement.  One would
normally expect toString to match for equal objects, but it is
not required.  Atter all, the default toString will not satisfy
this requirement if equals has been redefined.  And I often put
in a sequence number in the toString result, for debugging.
        --Per Bothner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]