We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bdabe1 commit c93bef0Copy full SHA for c93bef0
contents/how-do-i-compare-strings-in-java.md
@@ -40,5 +40,5 @@ new String("test") == new String("test") // --> false
40
```
41
42
###其他
43
-- 如何你重写了equal方法,记得相对应地修改hashcode方法,否则将会违反这两个方法的对等关系,如果两个对象是相等(equal)的,那么两个对象调用hashCode必须产生相同的整数结果,即:equal为true,hashCode必须为true,equal为false,hashCode也必须为false
44
-- 如果要忽略大小写进行对比,可以用equalsIgnoreCase()方法
+- 如果你重写了equal方法,记得相对应地修改hashcode方法,否则将会违反这两个方法的对等关系,如果两个对象是相等(equal)的,那么两个对象调用hashCode必须产生相同的整数结果,即:equal为true,hashCode必须为true,equal为false,hashCode也必须为false
+- 如果要忽略大小写进行对比,可以用equalsIgnoreCase()方法
0 commit comments