Skip to content

Commit e2617f5

Browse files
committed
修改文字拼写错误
1 parent 3879b70 commit e2617f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/b-2Java集合.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public interface RandomAccess {
124124

125125
### 2.2.7. HashSet如何检查重复
126126

127-
以下内容摘自我的 Java 启蒙书《Head fist java》第二版:
127+
以下内容摘自我的 Java 启蒙书《Head first java》第二版:
128128

129129
当你把对象加入`HashSet`时,`HashSet` 会先计算对象的`hashcode`值来判断对象加入的位置,同时也会与其他加入的对象的 `hashcode` 值作比较,如果没有相符的 `hashcode``HashSet` 会假设对象没有重复出现。但是如果发现有相同 `hashcode` 值的对象,这时会调用`equals()`方法来检查 `hashcode` 相等的对象是否真的相同。如果两者相同,`HashSet` 就不会让加入操作成功。
130130

0 commit comments

Comments
 (0)