Java Leap Year Check isLeapYear(int y)

Here you can find the source of isLeapYear(int y)

Description

is Leap Year

License

Open Source License

Declaration

public static final boolean isLeapYear(int y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static final boolean isLeapYear(int y) {
        if (y % 4 == 0) {
            if (y % 100 == 0) {
                if (y % 400 == 0) {
                    return true;
                } else {
                    return false;
                }//from  w ww.  j a va 2s. c  o m
            } else {
                return true;
            }
        }
        return false;
    }
}

Related

  1. isJulianLeapYear(int normalizedJulianYear)
  2. isJulianLeapYear(int normalizedJulianYear)
  3. isLeapYear(final int year)
  4. isLeapYear(final int year)
  5. isLeapYear(int prolepticYear)
  6. isLeapYear(int y)
  7. isLeapYear(int year)
  8. isLeapYear(int year)
  9. isLeapYear(int year)