mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-08-01 16:28:03 +08:00
Merge pull request #2393 from JosephConrad2017/main
Update java-collection-questions-02.md
This commit is contained in:
commit
7a31e22f8e
@ -239,7 +239,7 @@ for (int binCount = 0; ; ++binCount) {
|
||||
// 遍历到链表最后一个节点
|
||||
if ((e = p.next) == null) {
|
||||
p.next = newNode(hash, key, value, null);
|
||||
// 如果链表元素个数大于等于TREEIFY_THRESHOLD(8)
|
||||
// 如果链表元素个数大于TREEIFY_THRESHOLD(8)
|
||||
if (binCount >= TREEIFY_THRESHOLD - 1) // -1 for 1st
|
||||
// 红黑树转换(并不会直接转换成红黑树)
|
||||
treeifyBin(tab, hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user