MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.text.ParseException;
import java.util.GregorianCalendar;

public class MainClass {

    public static void main(String[] args) throws ParseException {
        System.out.println(isLeapYear(2000));
    }

    public static boolean isLeapYear(int year) {

        GregorianCalendar gcal = new GregorianCalendar();
        return gcal.isLeapYear(year);
    }

}