This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Depricated Date class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Depricated Date class" Watch "Depricated Date class" New topic
Author

Depricated Date class

Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
When Date class is depricated and all other classes are extending from date how to get Todays Date w/o calender?


Thankx
Ajit
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Ajit,
The Date class is depricated because the Calendar class is more general. The answer to your question seems to be that you can't. To get todays date you would use any Calendar subclass (i.e., GregorianCalendar):

Regards,
Manfred.
Matthew Jones
Ranch Hand

Joined: Dec 21, 2000
Posts: 68
Just because a class is deprecicated doesn't mean you can't use it, it just means that a better way of doing the same thing was developed, and it will give you a depreciation message when you compile, but the code will still work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Depricated Date class
 
Similar Threads
How to Convert String into Date
what is the meaning of the deprecated in APIs
Date - problem
using calendar as a date type
Date -problem