Java examples for java.util:Year
is Gregorian Leap Year
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int y = 2; System.out.println(isGregorianLeapYear(y)); }// w w w .j ava 2 s.c om public static boolean isGregorianLeapYear(int y) { return (y & 3) == 0 && y % 100 != 0 || y % 400 == 0; } }