Here you can find the source of getCurrentYear()
public static String getCurrentYear()
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Main { public static String getCurrentYear() { DateFormat tempDate = new SimpleDateFormat("yyyy"); return tempDate.format(new java.util.Date()); }/*from ww w.j a va 2 s . c om*/ }