Here you can find the source of is_leap_year(int year)
public static boolean is_leap_year(int year)
//package com.java2s; public class Main { public static boolean is_leap_year(int year) { boolean result; if ((year % 4) != 0) result = false;/*from w w w . ja v a2 s .co m*/ else if ((year % 400) == 0) result = true; else if ((year % 100) == 0) result = false; else result = true; return result; } }