j.u.Date Deprecation
As stated in the correct answer by Ryan Carlson, some of the java.util.Date class' methods are deprecated but not the entire class.
Yes, you should certainly avoid the java.util.Date/Calendar classes except where required by other classes. They are badly designed and implemented. Try to do all your calculations and business logic using other, more competent libraries.
Joda-Time
Currently, you should be using Joda-Time 2.3.
Quick example…
// © 2013 Basil Bourque. This source code may be used freely forever by anyone taking full responsibility for doing so.
// import org.joda.time.*;
// import org.joda.time.format.*;
DateTime nowInParis = new DateTime( DateTimeZone.forID( "Europe/Paris" ) );
DateTime newDayInParis = nowInParis.plusDays( 1 ).withTimeAtStartOfDay();
Dump to console…
System.out.println( "nowInParis: " + nowInParis );
System.out.println( "newDayInParis: " + newDayInParis );
Convert to UTC/GMT…
System.out.println( "now in UTC: " + nowInParis.toDateTime( DateTimeZone.UTC ) );
When run…
nowInParis: 2013-12-28T03:20:35.331+01:00
newDayInParis: 2013-12-29T00:00:00.000+01:00
now in UTC: 2013-12-28T02:20:35.331Z
JSR 310
In the near future, Java 8 will become available with a new set of java.time.* classes defined in JSR 310. These classes are inspired by Joda-Time but are entirely re-architected. The java.time classes have similar concepts to Joda-Time but you definitely need to do some re-learning.
- If available, use Java 8's java.time classes.
Early releases of Java 8 are available.
A back-port of these classes to Java 7 was begun, but I don't know the status.
- If not available use, use Joda-Time.
Joda-Time is still actively supported and continues to work in Java 8 as well as Java 7, 6, and 5. For Java 4 you can use the very similar v1.x.
Here's a nice article explaining Java 8 java.time.* classes, Java 101: The next generation: It's time for a change – Catching up with the Java Date and Time API, by Jeff Friesen.