Here you can find the source of getDateAfterMonths(Date start, int months)
public static Date getDateAfterMonths(Date start, int months)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getDateAfterMonths(Date start, int months) { return add(2, months, start); }/* ww w .j a v a 2 s .c o m*/ private static Date add(int datePart, int detal, Date date) { Calendar c = Calendar.getInstance(); if (date != null) c.setTime(date); c.add(datePart, detal); return c.getTime(); } }