This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Overriding equals() method within a subclass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Overriding equals() method within a subclass

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 659

I would like to override the equals() method within a sub-class, how do I go about it?







Jon
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36598
    
  16
I have already given you information here, so shall we continue the discussion there?

Closing this thread.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Overriding equals() method within a subclass
 
Similar Threads
Best way to represent cards?
Compare an Object to an Enum list
Arraylist insights
cannot read a Collection of a custom class as a parameter
looping through an enum?