Here you can find the source of getAfterDate(Date date, int days)
public static String getAfterDate(Date date, int days)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static String getAfterDate(Date date, int days) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar calendar = Calendar.getInstance(); calendar.setTime(date);/* w w w . j ava 2 s . com*/ calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + days); return df.format(calendar.getTime()); } }