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 are "methods" and "fields"?
Discuss 2D arrays.
What is the primitive type short?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What variables are stored in stack?
What is the console in java?
What are adapter classes?
What do you mean by formatting?
What is a Hash Table? What are the advantages of using a hash table?
Which package is imported by default?
What is difference between fileinputstream and filereader in java?
How to make a class or a bean serializable?
Does java map allow duplicates?
What is a map in java?
How can we create a synchronized collection from given collection?