Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.GregorianCalendar;

public class Main extends GregorianCalendar {

    public static void main(String[] args) {

        Main cal = new Main();

        // use internal get to get the year
        System.out.println("Year is : " + cal.internalGet(YEAR));

        // use internal get to get the month
        System.out.println("Month is : " + cal.internalGet(MONTH));

    }
}