java.util.DateThe java.util.Date class represents date and time in java. It provides constructors and methods to deal with date and time in java. The java.util.Date class implements Serializable, Cloneable and Comparable After Calendar class, most of the constructors and methods of java.util.Date class has been deprecated. Here, we are not giving list of any deprecated constructor and method. java.util.Date Constructors
java.util.Date Methods
java.util.Date ExampleLet's see the example to print date in java using java.util.Date class. 1st way: Output: Wed Mar 27 08:22:02 IST 2015 2nd way: Output: Wed Mar 27 08:22:02 IST 2015 Next Topicjava.sql.Date class
|