do I need to override the equals() method?
- From: Marteno Rodia <marteno_rodia@xxxxx>
- Date: Fri, 3 Apr 2009 03:01:07 -0700 (PDT)
Hello,
I've defined a class which, of course, silently extends
java.lang.Object, but I've added some my own attributes. Now I want to
be able to compare two objects of my class i.e. to check if they are
identical. Do I need to write my own equals() method or can I use the
inherited java.lang.Object.equals() method?
MR
.
- Follow-Ups:
- Re: do I need to override the equals() method?
- From: Mark Rafn
- Re: do I need to override the equals() method?
- From: Roedy Green
- Re: do I need to override the equals() method?
- From: Albert
- Re: do I need to override the equals() method?
- Prev by Date: Re: Classes "Dependency Walker"?
- Next by Date: Re: Classes "Dependency Walker"?
- Previous by thread: Throwing Constructor Exceptions and cleaning up
- Next by thread: Re: do I need to override the equals() method?
- Index(es):