Year getValue()
gets the year value.
getValue
has the following syntax.
public int getValue()
The following example shows how to use getValue
.
import java.time.Year; /*from w ww .ja v a2s .c o m*/ public class Main { public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.getValue()); } }
The code above generates the following result.