Re: Magic number in Boolean
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Fri, 10 Mar 2006 16:29:02 GMT
On Fri, 10 Mar 2006 16:51:00 +0100, Hendrik Maryns
<hendrik_maryns@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :
Ok, but then why not 1 and 2, they are also both prime. Of course I see
the use of taking some bigger number, but still the question remains:
why some primes around 1200? Because accidentally the implementor knew
Consider what happens when you create a composite hashCode either by
multiplication, addition, xor, shift/or etc .
My guess is those numbers help the boolean effect from getting lost.
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- Prev by Date: Re: Compiler telling me I have 1.4 JDK when i have 1.5 wont compile generics code
- Next by Date: Re: when using equals method with a null string...
- Previous by thread: Re: Magic number in Boolean
- Next by thread: Re: Magic number in Boolean