Here you can find the source of getNextMonth(Calendar aCal)
public static String getNextMonth(Calendar aCal)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getNextMonth(Calendar aCal) { DateFormat aFmt = new SimpleDateFormat("yyyy-MM-dd"); Calendar cal = (Calendar) aCal.clone(); cal.add(Calendar.MONTH, 1); return aFmt.format(cal.getTime()); }//from www.j a va 2s. c o m public static String getNextMonth() throws Exception { Calendar now = Calendar.getInstance(); return getNextMonth(now); } }