if two references are having same hash codes,is that means
those are refering to same object?
Answer Posted / dheerendra
If two objects are same then on equals obj1.equals(obj2)
return true as well as the hashCode will also be same but if
the hashCode of two objects are same then it is not sure
that objects would point to same reference.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we increase array size dynamically in java?
What is final access modifier in java?
What is externalizable?
What environment variables are required to be set on a machine in order to run Java programs?
Is assembly language a low level language?
Is array an object in java?
Write java program to reverse string without using api?
What if constructor is protected in java?
Is treeset sorted in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
Is array serializable java?
What are the files generated after using IDL to java compiler?
What is the best definition for data?
Explain the public class modifier?
What do you understand by garbage collection in Java? Can it be forced to run?