Because:
-
0x7FFFFFFF
is 0111 1111 1111 1111 1111 1111 1111 1111 : all 1 except the sign bit. -
(hash & 0x7FFFFFFF)
will result in a positive integer. -
(hash & 0x7FFFFFFF) % tab.length
will be in the range of the tab length.
Because:
0x7FFFFFFF
is 0111 1111 1111 1111 1111 1111 1111 1111 : all 1 except the sign bit.
(hash & 0x7FFFFFFF)
will result in a positive integer.
(hash & 0x7FFFFFFF) % tab.length
will be in the range of the tab length.