Here you can find the source of addDays(Date date, int day)
public static Date addDays(Date date, int day)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date addDays(Date date, int day) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(getMillis(date) + ((long) day) * 24 * 3600 * 1000); return c.getTime(); }/*from w w w . j a va2s . c om*/ public static long getMillis(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c.getTimeInMillis(); } }