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 / prasanna

If two objects are equal then there hashcode must same.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the transient field modifier?

539


Can static methods be inherited?

508


Is zero a positive integer?

511


How to make a write-only class in java?

556


How do you remove an object from an arraylist in java?

443






What is the list interface in java programming?

562


What does g mean in regex?

536


How to pass arraylist to stored procedure in java?

523


What are the legal operands of the instanceof operator?

532


How do you do math powers in java?

554


Explain about main thread in java?

587


What is the difference between scrollbar and scrollpane?

591


How will you initialize an Applet?

595


Why string objects are immutable in java?

540


What is nextline method in java?

532