Title basically says it all. I’ve tried Googling but return a load of false positives. I guess I’m just wondering if there was a certain rationale behind these two specific numbers or could they have easily been many other sets of numbers?
Edit: And, since the source of the numbers has been answered, any reason why writers of the Boolean hashCode method used those numbers (besides that they’re prime)? Would any other set of prime numbers worked just as well?
Hash functions are prone to collisions. The number of collisions can be reduced by using prime numbers (think about the factors prime numbers have). 1231 and 1237 are both prime numbers.
/e1
After doing a little more research I came across this: