Hash Code : There are quite a few ways we can convert keys:

  • Memory address: we reinterpret the memory address of the key object as an integer (default hash code for Java objects)
  • Integer cast: we reinterpret the bits of the key as an integer
  • Component sum: we partition the bits of the key into fixed length components, and sum the components (ignoring overflow)