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 ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of variable is error flag?

836


How many types of the indexof method are there for strings?

730


What is mean by encoding?

823


When do we need to use internal iteration? When do we need to use external iteration?

848


What is a stringbuilder?

710


How would overload a function based on return type?

767


What is javac used for?

701


Why do we use threads in java?

812


Can you give names of Container classes?

2054


What is command line argument in java?

852


What is used of static keyword in java?

781


Are arrays static in java?

802


what are the states associated in the thread? : Java thread

840


Which eclipse is best for java?

752


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

929