Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.util.Date

 
Marie Mazerolle
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With so many of its methods deprecated, what should this class be used for? Should I use it at all, or use SimpleDateFormat, Calendar and GregorianCalendar?
Thanks,
Marie
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Calendar and friends were intended to supplant Date. You ought to use Calendar for new development; use Date mostly just for backward compatibility with older code.
 
Marie Mazerolle
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Ernest!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic