Here you can find the source of nextMonth(Date d)
public static Date nextMonth(Date d)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date nextMonth(Date d) { return addMonth(d, 1); }/*from w ww.java 2 s . c o m*/ public static Date addMonth(Date d, int mth) { if (d == null) return d; Calendar cal = Calendar.getInstance(); cal.clear(); cal.setTime(d); cal.add(Calendar.MONTH, mth); return cal.getTime(); } }