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