Overriding the equals() method

I was looking for any best practices related to overriding the equals() method in objects and came across javapractices.com, which has a section devoted to the equals() method: Implementing equals. This article doesn’t really answer the question of “when” you override the method, although from other reading I can surmise that you do so whenever you think you or someone else may need to use the object as a key in a hashtable. Any other opinions as to the “when” of overriding the equals() method?

Leave a Reply

Your email address will not be published. Required fields are marked *