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


Please Help Members By Posting Answers For Below Questions

Can we increase array size dynamically in java?

519


What is final access modifier in java?

596


What is externalizable?

622


What environment variables are required to be set on a machine in order to run Java programs?

624


Is assembly language a low level language?

504






Is array an object in java?

556


Write java program to reverse string without using api?

560


What if constructor is protected in java?

563


Is treeset sorted in java?

590


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

625


Is array serializable java?

528


What are the files generated after using IDL to java compiler?

595


What is the best definition for data?

523


Explain the public class modifier?

509


What do you understand by garbage collection in Java? Can it be forced to run?

559