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.
I think it is because Comparator is implemented as a separate class so you don't need to be able to modify the object being sorted, whereas Comparable must be implemented as a method in the class being sorted...hard to do if you can't modify the object.
SCJP 6 88%
skipping SCJD to work on passing SCWCD
Joined: Nov 07, 2008
True true... I always just assume that whatever object you are going to sort is known upfront and/or you can change the code.
Obviously that is a bad assumption. Thanks, makes since!