HashMap 中hash table 定位算法: int hash = hash(key.hashCode()); int i = indexFor(hash, table.length); 其中indexFor和hash源码如下: /** * Applies a supplemental hash function to a given hashCode, which * defends against poor quality hash functions. This is critica…