1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Merge pull request #1247 from 1725636955/master

fix(java容器): jdk1.8,HashMap源码,HashMap扩容条件描述修改
This commit is contained in:
Guide哥 2021-06-14 22:54:06 +08:00 committed by GitHub
commit 6093a1c9c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,8 +27,8 @@ JDK1.8 之前 HashMap 由 数组+链表 组成的,数组是 HashMap 的主体
JDK1.8 之后 HashMap 的组成多了红黑树,在满足下面两个条件之后,会执行链表转红黑树操作,以此来加快搜索速度。
- 链表长度大于阈值(默认为 8
- HashMap 数组长度超过 64
- 链表长度大于或等于阈值(默认为 8
- HashMap 数组长度大于或等于 64
## 底层数据结构分析