what is the difference between == operator and equals()? (with hashcode() ???)

后端 未结 6 702
长发绾君心
长发绾君心 2020-11-28 15:20

I was learning hashcode in more depth and figured that:

1. If you override equals(), you must override hashcode() too.

2. To find if

6条回答
  •  粉色の甜心
    2020-11-28 15:59

    If you don't already have a copy; buy a copy of Effective Java by Joshua Bloch.

    This is the de facto reference for Java developers and has a lot of information on this (and many other) subject.

提交回复
热议问题