This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
As per my understanding HashMap applies a supplemental hash function to a given hashCode, which defends against poor quality hash functions.
While looking in the HashMap code, I figured out that below method is being used for this purpose, Can any one help me in understanding below queries ? -
1-How does this function insure that a less number of buckets would be created than the range of integer?
2- How many maximum buckets would be made while using this hash function?
3- Why the programmer has used specific numbers ie 20, 12,7, 4 to be used in shift operation?
4- why the programmer has used right shift and XOR operator?