Year length()
gets the length of this year in days.
length
has the following syntax.
public int length()
The following example shows how to use length
.
import java.time.Year; /*from w ww . j ava 2 s . c o 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.