Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

B 4.1.6 Worksheet 2 Java

Name: _________________________ Scenario: You have a HashMap that is using an internal array of size 16 (indices 0-15). The HashMap calculates the final index using the formula: index = Math.abs(key.hashCode()) % 16. (We use Math.abs() because hashCode() can sometimes be negative). Instructions: For each key, you are given its hashCode(). Calculate the final storage index. Thinking Question The hashCode() for "Alice"...

Help