Last active
March 14, 2016 16:56
-
-
Save victorvaz/2ad7bd1ef006833401d5 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
package datanojava; | |
import java.util.GregorianCalendar; | |
public class AnoBissexto { | |
public static void main (String[] args) { | |
GregorianCalendar gc = new GregorianCalendar(); | |
System.out.println(gc.isLeapYear(2015)); // false. Não é bissexto. | |
System.out.println(gc.isLeapYear(2016)); // true. É bissexto. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment