Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to override equals method

843793Oct 29 2008 — edited Oct 31 2008
The equals method accepts Object as the parameter. When overriding this method we need to downcast the parameter object to the specific. The downcast is not the good idea as it is not the OO. So can anyone please tell me how can we override the equals method without downcasting the parameter object. Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2008
Added on Oct 29 2008
7 comments
478 views