posted 18 years ago
If the key is not in the HashMap, and no other keys in the Map hash to the same bucket, then equals() won't be called -- so even given Sun's current HashMap implementation, your "ALWAYS" isn't really "ALWAYS." But the point I'm trying to make is that there's no official specification or rule that says HashMap will call this method, then this method, in any specific order. It's fine to try to understand how things work, but reducing things to oversimplified rules this way is just silly.