Doesn't it create problems when you are trying to store two objects,
whose truncated hashcodes are same, into the same hashtable ?
Or the hashtable knows this and handles appropriately ??

--
ramky

At 04:53 PM 10/19/98 -0700, [EMAIL PROTECTED] wrote:
>Reddy Ramakrishna <[EMAIL PROTECTED]> writes:
>> 
>> Can somebody explain me how japhar generates hashcode in java.lang.Object ?
>> I would like to know the algorithm and where in japhar code I can find
>> the implementation.
>
>java.lang.Object simply returns the address of the object, cast to a
>32 bit int.
>
>this may involve truncating, but that isn't a problem, since it
>doesn't matter if two objects have the same hashcode -- just that one
>object always return the same hashcode.
>
>xtoph
> 

Reply via email to