Created
November 21, 2021 23:01
-
-
Save bartubozkurt/3fba638ff3fb20d77740c25ffdafd4db to your computer and use it in GitHub Desktop.
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
public class LeapYear { | |
public boolean isLeapYear(int year) { | |
if (year % 400 == 0) | |
return true; | |
if (year % 100 == 0) | |
return false; | |
return year % 4 == 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment