问问各位大神,我用设值注入和构造注入输出的两个string的hashcode是一样的,这没关系的吧?
hashcode相等未必equals,string特殊,不会重写hashcode方法,也不会有人使用hashcode验证,所以木关系。
请问hashcode方法是干嘛用的?
两个string值是一样的hashcode才会相等。