collection 类对象在调用remove,contains 等方法时需要比较对像是否相等,会涉及到hashcode,和equals.()方法
内容相等的两个对像其hashcode 值是相等的
equals()相等=》hashcode 相等反之不成立
collection 类对象在调用remove,contains 等方法时需要比较对像是否相等,会涉及到hashcode,和equals.()方法
内容相等的两个对像其hashcode 值是相等的
equals()相等=》hashcode 相等反之不成立