Home Java SCJP SCWCD Servlet Submit News Contact Us Site Map


Over 500 magazines for free (including Oracle Magazine)!

Yes all of them are FREE. You can subscribe to ALL of them.
Click here to apply today!

JavaDeveloper.co.in network has launched a dedicated site just for Java Examples. You can now learn java language by examples.

Please visit Java Examples to get started !

/*

Java Date example.

This Java Date example describes how Java Date class is being used in Java language.

*/

import java.util.*;

/*

Most of the methods of the Java Date class have been depricated.

Java Calendar class should be used for date manipulation instead.

*/

public class JavaDateExample{

public static void main(String args[]){

/*

Create date object with current date and time.

*/

Date date = new Date();

System.out.println("Today is " + date);

}

}

/*

OUTPUT of the above given Java Date Example would be :

Today is Sat Feb 04 18:10:21 IST 2005

*/

For more java examples please visit Java Examples

Home Java SCJP SCWCD Servlet Site map