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

What does sprintf return?

810


What is an array length?

689


What is the difference between serial and throughput garbage collector?

793


Wha is the output from system.out.println(“hello”+null); ?

897


List some important features of java 10 release?

728


Which sorting is used in arrays sort in java?

868


Why method overriding is used?

774


What is used of static keyword in java?

774


Why is it called buffering?

827


Explain thread life cycle in java?

790


Why are the destructors for base class and derived class called in reverse order when the program exits

1937


What is the purpose of java?

767


Is it possible to override the main method?

732


What is parameter example?

775


Explain the features of interfaces in java?

750