Here you can find the source of getCurrentYear()
Returns the current year from the system Calendar calendar .
public static int getCurrentYear()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { /**/*from w w w. j a va2 s .c om*/ * <p> * Returns the current year from the system {@link Calendar calendar}. * </p> * * @return The current year as indicated by the system {@link Calendar * calendar}. */ public static int getCurrentYear() { int returnValue; returnValue = Calendar.getInstance().get(Calendar.YEAR); return returnValue; } }