hashmap与concurrenthashmap zhumeilu 2017-12-14 152 阅读1分钟 hashmap的默认长度 Length一般为2的幂数 hashmap的hash算法 index = HashCode(Key) & (Length - 1) 高并发下的hashmap Capacity hashmap的长度 LoadFactor HashMap负载因子,默认值为0.75f hashmap的rehash,当HashMap.Size >= Capacity * LoadFactor,就会发送扩容,进行rehash,这样可能会生成环状链表