As we use equals() and HashCode() methods while creating objects in Java, but most of us don’t know how to use them properly. In this post i’ll explain which to use and when. Object.equals() provides a default implementation of equality-comparison and at times the default implementation is just fine and…