Vita:leap year

Az oldal más nyelven nem érhető el.
A Wikiszótárból, a nyitott szótárból
public class  LeapYear
{
	public static void main(String[] args)
	{
		int year = Integer.parseInt(args[0]);
		boolean isLeapYear;
		// div by 4 but not 100
		isLeapYear = (year % 4 == 0) && (year % 100 != 0);
		// div by 400
		isLeapYear = isLeapYear || (year % 400 == 0);
		System.out.println(isLeapYear);
	}
}