diff --git a/docs/basics/java-basic/hashmap-capacity.md b/docs/basics/java-basic/hashmap-capacity.md index 42ab2d12c93375876ac9d01c53690fc9f3c05977..31042370de8629cdf2a1fdc42c220426df115c38 100644 --- a/docs/basics/java-basic/hashmap-capacity.md +++ b/docs/basics/java-basic/hashmap-capacity.md @@ -15,9 +15,9 @@ HashMap类中有以下主要成员变量: * transient int size; * 记录了Map中KV对的个数 * loadFactor - * 装载印子,用来衡量HashMap满的程度。loadFactor的默认值为0.75f(`static final float DEFAULT_LOAD_FACTOR = 0.75f;`)。 + * 装载因子,用来衡量HashMap满的程度。loadFactor的默认值为0.75f(`static final float DEFAULT_LOAD_FACTOR = 0.75f;`)。 * int threshold; - * 临界值,当实际KV个数超过threshold时,HashMap会将容量扩容,threshold=容量*加载因子 + * 临界值,当实际KV个数超过threshold时,HashMap会将容量扩容,threshold=容量*装载因子 * 除了以上这些重要成员变量外,HashMap中还有一个和他们紧密相关的概念:capacity * 容量,如果不指定,默认容量是16(`static final int DEFAULT_INITIAL_CAPACITY = 1 << 4;`) @@ -166,4 +166,4 @@ HashMap中size表示当前共有多少个KV对,capacity表示当前HashMap的 PS:文中分析基于JDK1.8.0_73 [1]: http://www.hollischuang.com/wp-content/uploads/2018/05/paramInMap.png - [2]: http://www.hollischuang.com/archives/2091 \ No newline at end of file + [2]: http://www.hollischuang.com/archives/2091