1.

If A.equals(b) Is True Then A.gethashcode & B.gethashcode Must Always Return Same Hash Code.

Answer»

The answer is False because it is given that A.equals(B) RETURNS true i.e. objects are equal and now its hash Code is asked which is ALWAYS independent of the fact that whether objects are equal or not. So, GET HashCode for both of the objects returns different value.

The answer is False because it is given that A.equals(B) returns true i.e. objects are equal and now its hash Code is asked which is always independent of the fact that whether objects are equal or not. So, Get HashCode for both of the objects returns different value.



Discussion

No Comment Found