Create Gregorian Calendars in Java
Description
The following code shows how to create Gregorian Calendars.
Example
/* w ww. ja v a 2 s . c o m*/
import java.util.Date;
import java.util.GregorianCalendar;
public class Main {
public static void main(String[] a) {
GregorianCalendar calendar = new GregorianCalendar();
Date now = calendar.getTime();
System.out.println(now);
}
}
The code above generates the following result.