EJB spec says that PK class has to return a hashcode. What is the best way to implement this? My problem is, hashCode has to be int, and my PK is a compound key of three ints! I often saw: (PK1 + PK2 + PK3).hashCode() but PK1+PK2+PK3 can throw overflow (maxint+maxint+maxint>maxint!). So what would be the best solution?
- Re: Best way to implement a hash code for PK class... markus . karg
- Re: Best way to implement a hash code for PK ... Bryan \(Mailing Lists\)
