Here you can find the source of getDateAfter(Date date, Integer after)
public static Date getDateAfter(Date date, Integer after)
//package com.java2s; //License from project: Apache License import java.sql.Date; public class Main { public static Date getDateAfter(Date date, Integer after) { if (after == 0) { return new Date(date.getTime()); }/*from ww w. ja va 2 s .c o m*/ Date d = new Date(date.getTime()); for (int i = 0; i < after; i++) { d.setTime(d.getTime() + 86400000); } return d; } }