Skip to content

Commit f385bd9

Browse files
authored
Merge pull request Snailclimb#1524 from Itswag/main
[docs improve]优化表述
2 parents e346130 + 810fc9f commit f385bd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/java/collection/hashmap-source-code.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneabl
8585
static final int TREEIFY_THRESHOLD = 8;
8686
// 当桶(bucket)上的结点数小于这个值时树转链表
8787
static final int UNTREEIFY_THRESHOLD = 6;
88-
// 桶中结构转化为红黑树对应的table的最小大小
88+
// 桶中结构转化为红黑树对应的table的最小容量
8989
static final int MIN_TREEIFY_CAPACITY = 64;
9090
// 存储元素的数组,总是2的幂次倍
9191
transient Node<k,v>[] table;
@@ -95,7 +95,7 @@ public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneabl
9595
transient int size;
9696
// 每次扩容和更改map结构的计数器
9797
transient int modCount;
98-
// 临界值 当实际大小(容量*填充因子)超过临界值时,会进行扩容
98+
// 临界值(容量*填充因子) 当实际大小超过临界值时,会进行扩容
9999
int threshold;
100100
// 加载因子
101101
final float loadFactor;
@@ -562,4 +562,4 @@ public class HashMapDemo {
562562
}
563563

564564
}
565-
```
565+
```

0 commit comments

Comments
 (0)