What is the purpose of the `hashCode()` method in Java?
The `hashCode()` method is used to compute a unique integer representation for an object, which helps in storing and retrieving objects efficiently from hash-based collections like `HashMap`.
Excellent! You've captured the core purpose of `hashCode()` in Java.
Can you explain how the `hashCode()` value is used in hash-based collections like `HashMap`?