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

Give some features of interface?

586


What does percent mean in java?

590


What state does a thread enter when it terminates its processing in java programming?

578


What is JVM and is it platform independent?

561


What classes of exceptions may be thrown by a throw statement?

530






What is a instance variable?

583


What is java abstraction with example?

556


Why use string handling in Java?

583


Can we create constructor in abstract class ?

582


What is a substring of a string?

565


What are the 4 types of characters?

545


What is an example of procedure?

516


What are different types of multitasking?

547


What is an abstract class and what is it’s purpose?

539


What is ternary operator in java?

595