Java examples for java.util:Year
get Current Year
//package com.java2s; import java.util.Calendar; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getCurrentYear()); }/* www.j a v a 2 s .c o m*/ public static int getCurrentYear() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.YEAR); } }