code: public static Date addMonths(Date d, int months) {
          Calendar cal = Calendar.getInstance();
          cal.setTime(d);
          cal.add(Calendar.MONTH, months);
          return cal.getTime();
      }
docs: Add months to a date
  
  @param d date
  @param months months
  @return new date