class GregorianCalendar

class GregorianCalendar

GregorianCalendar is a concrete class, a subclass of abstract class Calendar. The GregorianCalendar class represents the calendar we use everyday. It is used to manipulate date and retrieve date particulars. This was introduced with JDK 1.1.

Following statement gives the class signature

public class GregorianCalendar extends Calendar

Following program illustrates the usage of a few variables and methods of GregorianCalendar.

All the methods and variables are self-descriptive. The first month of the year (January) is given as zero.