Set year, month day for a GregorianCalendar object in Java
Description
The following code shows how to set year, month day for a GregorianCalendar object.
Example
/*w w w.j a v a 2 s . c o m*/
import java.util.GregorianCalendar;
public class Main {
public static void main(String[] a) {
GregorianCalendar calendar = new GregorianCalendar();
calendar.set(1995, 10, 29); // Date set to 29th November 1999
}
}