hashCode, implementation, and relation to HashMap
问题 So I asked another related question here: java string hash function with avalanche effect, but I have a different, related question now. What I established in that question was that the hashCode() function for String does not have an avalanche effect. This means, for example, that if I have strings "k1", "k2", "k3", and I call hashCode() on each, the values returned will be contiguous. Now, based on my recollection of data structures 101, I was under the impression that this is a bad thing.