Hi, well i am unable to understand that why it is mandatory
to have same hashcode, if two objects are same?

Thanks in advance.

Answer Posted / nalluri

Hi,

No. Never same hash code to 2 same objects. every object is
having it's own hash code.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by bytecode?

579


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

513


Can I uninstall java?

555


Explain aggregation in java?

549


can used Protected Class outside Function.?

617






Is there any difference between nested classes and inner classes?

544


What does yield method of the thread class do?

583


What do you mean by constant time complexity?

604


What is the benefit of lambda expressions?

497


Why is the main method static?

608


How can you share data between two thread in Java?

530


What is externalizable interface?

584


What is a singleton factory?

516


Difference between object instantiation and construction ?

586


How objects of a class are created if no constructor is defined in the class?

583