Merge pull request #360 from peierlong/patch-2

Update Java 容器.md
This commit is contained in:
郑永川 2018-08-07 11:10:30 +08:00 committed by GitHub
commit b754e5ef81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,8 +680,8 @@ void transfer(Entry[] newTable) {
假设原数组长度 capacity 为 8扩容之后 new capacity 为 16
```html
capacity : 00010000
new capacity : 00100000
capacity : 00001000
new capacity : 00010000
```
对于一个 Key它的哈希值如果在第 6 位上为 0那么取模得到的结果和之前一样如果为 1那么得到的结果为原来的结果 + 8。