== operator in case object comparision
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   saumendra_kumar
Posted On:   Thursday, August 17, 2006 05:59 AM

if we compare two Object with == operator,what is compare,
hashcode of the object(contain of the reference) or address of the reference?

Re: == operator in case object comparision

Posted By:   rama_krishna  
Posted On:   Saturday, August 26, 2006 01:10 AM

== returns true, if two object references are equal i.e., they should be pointing to the same object.

equals return true, if two objects are meaningfully equivalent.

Re: == operator in case object comparision

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, August 17, 2006 06:33 AM

Reference is compared. Hashcode is used in equals()
About | Sitemap | Contact