java program leap year

http‮:s‬//www.lautturi.com
java program leap year
/**
 * @author lautturi.com 
 * Java example:check whether a year is a leap year in java
 */

import java.util.*;

public class Lautturi {
	public static boolean isLeapYear(int year) {
		if (year % 4 != 0) {
			return false;
		} else if (year % 400 == 0) {
			return true;
		} else if (year % 100 == 0) {
			return false;
		} else {
			return true;
		}
	}

	public static void main(String[] args) {
		int year = 2000;
		System.out.println(isLeapYear(year));
	}
}

output:

true
Created Time:2017-10-03 16:00:30  Author:lautturi