Here you can find the source of getNextYear()
public static int getNextYear()
//package com.java2s; /*// w w w . jav a2s . c o m * 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 getNextYear() { return new GregorianCalendar().get(Calendar.YEAR) + 1; } }