is Gregorian Leap Year - Android java.util

Android examples for java.util:Year

Description

is Gregorian Leap Year

Demo Code


//package com.java2s;

public class Main {
    public static boolean isGregorianLeapYear(int year) {
        boolean isLeap = false;
        if (year % 4 == 0)
            isLeap = true;/*from   ww w. ja  v  a  2  s  .co m*/
        if (year % 100 == 0)
            isLeap = false;
        if (year % 400 == 0)
            isLeap = true;
        return isLeap;
    }
}

Related Tutorials