GregorianCalendar: set(int year, int month, int date) : GregorianCalendar « java.util « Java by API





GregorianCalendar: set(int year, int month, int date)

  
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
  }
}

   
    
  










Related examples in the same category

1.new GregorianCalendar()
2.new GregorianCalendar(int year, int month, int dayOfMonth)
3.new GregorianCalendar(Locale aLocale)
4.new GregorianCalendar(TimeZone zone, Locale aLocale)
5.GregorianCalendar: get(int a)
6.GregorianCalendar: getTime()
7.GregorianCalendar: isLeapYear()
8.GregorianCalendar: roll(int field, boolean up)
9.GregorianCalendar: set(int field, int value)
10.GregorianCalendar: setTime(Date date)