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 the default access specifier for variables and methods of a class?

555


What is set string?

583


How much ram can a 64 bit processor theoretically?

451


What is break and continue statement?

599


Why do we need data serialization?

534






What is getclass () getname () in java?

665


Is c better than java?

530


What is the importance of main method in Java?

561


Why lambda expression is used in java?

555


Explain the reason behind ending a program with a system.exit(0)?

586


What is difference between protected and private?

516


When is the finally clause of a try-catch-finally statement executed?

485


What is lambda in java?

505


Explain the pointers in Java?

582


Should you use singleton pattern?

512