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 is the original name of java?

796


Is c better than java?

749


Which browsers work with java?

838


What is the maximum size of arraylist in java?

729


Is arraylist ordered in java?

796


Why is a string immutable?

791


What type of variable is gender?

767


Name few java util classes introduced with java 8 ?

728


What are keywords give examples?

821


Are arrays classes in java?

756


What is the disadvantage of synchronization?

787


What is preparedstatement in java?

802


What is consumer in java?

731


Why webdriver is an interface?

806


What is an empirical question?

784