This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes People suggest using Date class is deprecated, then for handling Date which class should be used??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "People suggest using Date class is deprecated, then for handling Date which class should be used???" Watch "People suggest using Date class is deprecated, then for handling Date which class should be used???" New topic
Author

People suggest using Date class is deprecated, then for handling Date which class should be used???

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
People suggest using Date class is deprecated, then for handling Date which class should be used???
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19674
    
  18

People who say this are Joda Time users.

Date (and Calendar) are not deprecated at all, but some say that Joda Time is easier to use. I can't confirm since Date and Calendar have always done what I needed.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38467
    
  23
The java.util.Date class has a deprecated constructor. That must be what they mean.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19674
    
  18

Ah yes, and almost all of its getter / setter methods are deprecated. Calendar should be used for that. So not but Also, not but
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Us JodaTime users don't say they're deprecated, just that they're heinous ;)
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38467
    
  23
David Newton wrote:Us JodaTime users don't say they're deprecated, just that they're heinous ;)
Probably a more accurate quote :wink:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: People suggest using Date class is deprecated, then for handling Date which class should be used???