Java Date Time Java Java API
java.time.Year
public static Year of(int isoYear)
Obtains an instance of Year for the provided year value.
Year
package com.logicbig.example.year;import java.time.Year;public class OfExample { public static void main(String... args) { Year y = Year.of(2011); System.out.println(y); }}
2011