Hashcode and equals

后端 未结 7 2344
死守一世寂寞
死守一世寂寞 2020-11-30 14:00

equals and hashCode method must be consistent, which means that when two objects are equal according to equals method their hash

相关标签:
7条回答
  • 2020-11-30 14:55

    For starters, you need to capitalize the v in "Hashvalue"

    if(oo instanceof Hashvalue)
    

    should be

    if (oo instanceof HashValue)
    
    0 讨论(0)
提交回复
热议问题