Created
October 26, 2013 19:15
-
-
Save fado/7173404 to your computer and use it in GitHub Desktop.
So apparently there's a library for that...
This file contains 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
package uk.ac.qub.programming; | |
import java.util.GregorianCalendar; | |
public class PartThree9 { | |
public static void main(String[] args) { | |
GregorianCalendar calendar = (GregorianCalendar) | |
GregorianCalendar.getInstance(); | |
for (int counter = 1800; counter < 2013; counter++) { | |
boolean isLeapYear = calendar.isLeapYear(counter); | |
if (isLeapYear) { | |
System.out.println(counter); | |
} else { | |
continue; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment