Write code to get current Year
import java.util.Calendar; public class Main { public static void main(String[] argv) { System.out.println(getNowYear()); }// w ww . java2 s .com public static int getNowYear() { Calendar cc = Calendar.getInstance(); return cc.get(Calendar.YEAR); } }