Here you can find the source of getCurrYear()
public static int getCurrYear()
//package com.java2s; /*/* w ww. j ava2 s .c om*/ * Copyright 2012-2014 sammyun.com.cn. All rights reserved. * Support: http://www.sammyun.com.cn * License: http://www.sammyun.com.cn/license */ import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static int getCurrYear() { return new GregorianCalendar().get(Calendar.YEAR); } }