>
> Couldn't an "adding them together" solution like this have
> possible effect
> of going out of the range on int (greater than Integer.MAX_VALUE)?
> >
> >public int hashCode() {
> > int result = 0;
> > result = result * 127 + field1.hashCode();
> > result = result * 127 + field2.hashCode();
> > result = result * 127 + field3.hashCode();
> > result = result * 127 + field4.hashCode();
> > result = result * 127 + field5.hashCode();
> > return result;
> >}
> >
Addition and multipication overflow silently in Java, as in C.
- Avi
--
s/\be(\w+)/e-\1/g;
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".