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

Can we clone singleton class in java?

727


Is java pass by value or pass by reference?

759


What one should take care of, while serializing the object?

679


Can we compare two strings in java?

772


Can a static class have a constructor java?

744


How will you compute size of a structure?

808


What is the purpose of the file class in java programming?

760


Explain the term virtual machine?

812


Is 0 an irrational number?

827


What is ‘is-a ‘ relationship in java?

802


What are use cases?

751


What is treeset in java?

761


What is a parameter in simple terms?

763


What is backdrop?

819


What is anagram in java?

718