Here you can find the source of getNextYearMonthStr()
public static String[] getNextYearMonthStr()
//package com.java2s; import java.util.Calendar; public class Main { private static final String[] monthStrArray = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }; public static String[] getNextYearMonthStr() { String ret[] = new String[12]; Calendar c = Calendar.getInstance(); int nextYear = c.get(Calendar.YEAR) + 1; for (int i = 0; i < monthStrArray.length; i++) { ret[i] = nextYear + monthStrArray[i]; }/*from w w w .j a v a 2s . co m*/ return ret; } }