This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Depricated Date class" Watch "Depricated Date class" New topic

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?

Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
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):

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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Depricated Date class
Similar Threads
what is the meaning of the deprecated in APIs
Date - problem
using calendar as a date type
How to Convert String into Date
Date -problem