Year isLeap(long year) example
Description
Year isLeap(long year)
checks if the year is a leap year, according to the ISO proleptic
calendar system rules.
Syntax
isLeap
has the following syntax.
public static boolean isLeap(long year)
Example
The following example shows how to use isLeap
.
import java.time.Year;
/* w w w.j a v a 2 s . c o m*/
public class Main {
public static void main(String[] args) {
System.out.println(Year.isLeap(2014));
}
}
The code above generates the following result.