hashCode and equals method
In java world, hashCode & equals method plays a very important role. Uses of equals():- In java, equals() method used to assure equality of object and it should follow mathematics rule of equality. Reflexive: Always, a = a. In Java, a.equals(a) should always be true. Symmetric: If a = b, then b = a. In Java, if a.equals(b) is … Continue reading hashCode and equals method