Here you can find the source of nextMonth(Date date, int months)
public static Date nextMonth(Date date, int months)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Date nextMonth(Date date, int months) { Calendar cal = Calendar.getInstance(); if (date != null) { cal.setTime(date);//from ww w .j a va 2 s . c o m } cal.add(Calendar.MONTH, months); return cal.getTime(); } }