This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Of Course,overriding the equals() for Car also allows the potential that more than one object representing a single unique car can exist, which might not be safe in your design. Fortunately the String and Wrapper classes work well as keys in hashtable-they override the equals() method.
I dont quite understand the above. What does the overriden equals() of String and wrapper class has so special about it that I couldnt do with my class car. If I override the equals() of car class how is that not as good as the overiden equals() of String.