Skip to content

Commit 7dde745

Browse files
committed
feat: fix hash map desc
1 parent 594b453 commit 7dde745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notes/Java 容器.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ static int indexFor(int h, int length) {
650650
| capacity | table 的容量大小,默认为 16。需要注意的是 capacity 必须保证为 2 的 n 次方。|
651651
| size | 键值对数量。 |
652652
| threshold | size 的临界值,当 size 大于等于 threshold 就必须进行扩容操作。 |
653-
| loadFactor | 装载因子,table 能够使用的比例,threshold = capacity * loadFactor。|
653+
| loadFactor | 装载因子,table 能够使用的比例,threshold = (int)(newCapacity * loadFactor)|
654654

655655
```java
656656
static final int DEFAULT_INITIAL_CAPACITY = 16;

0 commit comments

Comments
 (0)