Question: 1 3 Suppose we define a class whose instances will be saved in HashTable or HashSet. So we override equals ( . . . .
Suppose we define a class whose instances will be saved in HashTable or HashSet. So we override equals and hashCode methods. Which conditions from given below must be satisfied: Puan
both methods should be declared protected
guarantee that equal objects generate same hash code
guarantee that unequal objects generate different hash code
both overridden methods must be public
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
