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

更新链表树化条件

This commit is contained in:
nicollcheng 2021-12-10 13:59:07 +08:00 committed by GitHub
parent 3c3a00b56f
commit 33521233a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -541,7 +541,7 @@ final V putVal(K key, V value, boolean onlyIfAbsent) {
5. 如果都不满足,则利用 synchronized 锁写入数据。 5. 如果都不满足,则利用 synchronized 锁写入数据。
6. 如果数量大于 `TREEIFY_THRESHOLD` 则要转换为红黑树。 6. 如果数量大于 `TREEIFY_THRESHOLD` 则要执行树化方法在treeifyBin中会首先判断当前数组长度≥64时才会将链表转换为红黑树。
### 4. get ### 4. get