posted 14 years ago
Say I need to add some new methods for java.util.Date. Which of the below are better options
1. Subclass Date and provide additional behaviors in the subclass
2. Decorate the date objects with wrapper
3. Add utility DateUtil and provide additional behaviors.
What I feel is that using wrapper would result in too much of delegated methods and subclass would be the best option.
Need an opinion if my assumption is correct
Cheers-
Joshua
SCJP,SCWCD, Into ATG now!