// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class LeapYear {
    public static boolean isLeapYear(int year) {
        return ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)));
    }
    public static void main(String[] args) {
        System.out.println(isLeapYear(2005));
        System.out.println(isLeapYear(2004));
        System.out.println(isLeapYear(2000));
        System.out.println(isLeapYear(1900));
    }

}
