Year length() example
Description
Year length()
gets the length of this year in days.
Syntax
length
has the following syntax.
public int length()
Example
The following example shows how to use length
.
import java.time.Year;
/* w w w. ja v a2s . co m*/
public class Main {
public static void main(String[] args) {
Year y = Year.of(2014);
System.out.println(y.length());
}
}
The code above generates the following result.