Java tutorial
import java.time.LocalDate; import java.time.Year; public class Main { public static void main(String[] args) { Year y = Year.from(LocalDate.now()); System.out.println(y); } }