Here you can find the source of addDaysToDate(Date date, int days)
public static Date addDaysToDate(Date date, int days)
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { private static final long ONE_DAY_IN_MILLIS = 24 * 60 * 60 * 1000; public static Date addDaysToDate(Date date, int days) { long epochTime = date.getTime() + (days * ONE_DAY_IN_MILLIS); return new Date(epochTime); }/*from w w w . j a v a2 s .c o m*/ }