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
What is a parameter used for?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
How to compare two strings in java program?
What is a double?
What is static keyword?
Is intellij better than eclipse?
Can we have any code between try and finally blocks?
What is supplier in java?
What is the use of default method in interface in java?
What is thread count in java?
How do you override a method in java?
Define canvas?
Is empty string in java?
Can a class be declared as protected?
What is byte code and why is it important to java’s use for internet programming?