Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Java 容器.md #754

Merged
merged 1 commit into from
Aug 11, 2019
Merged

Update Java 容器.md #754

merged 1 commit into from
Aug 11, 2019

Conversation

hwisecn
Copy link
Contributor

@hwisecn hwisecn commented Jul 29, 2019

应该是:从 JDK 1.8 开始, table的长度也就是HashMap的capacity(不是size)不能小于64而且在桶存储的链表长度为8时(准确的说是长度为7并且在继续塞第8个时),转换成红黑树,而不是超过8。

应该是:从 JDK 1.8 开始, table的长度也就是HashMap的capacity(不是size)不能小于64而且在桶存储的链表长度为8时(准确的说是长度为7并且在继续塞第8个时),转换成红黑树,而不是超过8。
@CyC2018
Copy link
Owner

CyC2018 commented Aug 11, 2019

@hwisecn 长度为 8 就开始转红黑树没问题,但不是指 table 长度,而是每个 Node 上的节点数。

@CyC2018 CyC2018 merged commit 4db347d into CyC2018:master Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants