Here you can find the source of getCurrentYear()
public static String getCurrentYear()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static String getCurrentYear() { int year = Calendar.getInstance().get(Calendar.YEAR); String currentYear = String.valueOf(year); return currentYear; }// www. j a v a2 s . co m }