I understand why providing same hashcode for two equal (through equals) objects is important. But is the vice versa true as well, if two objects have same hash
hashcode() returns a unique integer ID for each object. If an object’s hashcode is not the same as another object’s hashcode, there is no reason to execute the equals() method: you just know the two objects are not the same. On the other hand, if the hashcode is the same, then you must execute the equals() method to determine whether the values and fields are the same.