Here you can find the source of currentYear()
public static Integer currentYear()
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static Integer currentYear() { GregorianCalendar gFechaActual = new GregorianCalendar(); return gFechaActual.get(GregorianCalendar.YEAR); }//from w w w. j a v a2 s . com }