Skip to content

Commit 10fbec0

Browse files
authored
Update HashMap.md
1 parent d85f369 commit 10fbec0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Java相关/HashMap.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,23 @@ static final class TreeNode<K,V> extends LinkedHashMap.Entry<K,V> {
173173
![四个构造方法](https://user-gold-cdn.xitu.io/2018/3/20/162410d912a2e0e1?w=336&h=90&f=jpeg&s=26744)
174174
```java
175175
// 默认构造函数。
176-
public More ...HashMap() {
176+
public HashMap() {
177177
this.loadFactor = DEFAULT_LOAD_FACTOR; // all other fields defaulted
178178
}
179179

180180
// 包含另一个“Map”的构造函数
181-
public More ...HashMap(Map<? extends K, ? extends V> m) {
181+
public HashMap(Map<? extends K, ? extends V> m) {
182182
this.loadFactor = DEFAULT_LOAD_FACTOR;
183183
putMapEntries(m, false);//下面会分析到这个方法
184184
}
185185

186186
// 指定“容量大小”的构造函数
187-
public More ...HashMap(int initialCapacity) {
187+
public HashMap(int initialCapacity) {
188188
this(initialCapacity, DEFAULT_LOAD_FACTOR);
189189
}
190190

191191
// 指定“容量大小”和“加载因子”的构造函数
192-
public More ...HashMap(int initialCapacity, float loadFactor) {
192+
public HashMap(int initialCapacity, float loadFactor) {
193193
if (initialCapacity < 0)
194194
throw new IllegalArgumentException("Illegal initial capacity: " + initialCapacity);
195195
if (initialCapacity > MAXIMUM_CAPACITY)

0 commit comments

Comments
 (0)