/** * A program to tell whether an year is leap year or not. * @author Umang Bhatt */ public class LeapYearTester { public static boolean isLeapYear(int year) { boolean isLeapYear ; if (year % 4 == 0) { if (year % 100 == 0) { if (year % 400 == 0) { isLeapYear = true; } else { isLeapYear = false; } } else { isLeapYear = true; } } else { isLeapYear = false; } return isLeapYear; } public static void main(String args[]) { System.out.println(isLeapYear(2003)); } }