This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Checks whether the given year is a leap year. | |
| * @return true if and only if the input year is a leap year. | |
| */ | |
| public static boolean isLeapYear(int year) { | |
| if(year % 400 == 0) { | |
| return true; | |
| } else if(year % 100 == 0) { | |
| return false; | |
| } else if(year % 4 == 0) { | |
| return true; |
NewerOlder