On 2008-06-15, at 21:17 , nat_tul wrote:
> Correct me if i'm wrong.
>
> You state about Object.equals(Object) will return false because it's
> not
> reside in the same address on memory.
>
> I don't agree with this one since Object.equals(Object) should check
> the
> equality of semantic, not just address of object.
>
No. The generic Object class implements equals() to check object
identity (same address in memory). If you want equals() to check
object value, then you need to implement equals() that way.
Take care.
----
J. B. (Joe) Rainsberger :: http://www.jbrains.ca
Your guide to software craftsmanship
JUnit Recipes: Practical Methods for Programmer Testing
2005 Gordon Pask Award for contributions to Agile Software Practice
.