A general question regarding hashcode from K&B(scjp5) page 533.now we know that if the hashcode value is defined like the
one in class car regardless of the whether the equals method return true or false;all the objects land in the same bucket
time taking to locate the correct object;
Now my question is if we delete a car key from a hashmap,will all the map entries for all keys of type car be deleted??
I am not clear on this.can someone explain please?
public class Car {
private model;
public Car(
String model) {
this.model=model;
}
public int hashcode() {
return 1492;
}
}