Here you can find the source of dateAddDay(Date date, int day)
public static Date dateAddDay(Date date, int day)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date dateAddDay(Date date, int day) { if (date == null) return now(); Calendar c = Calendar.getInstance(); c.setTime(date);/* w w w . j a va2 s . c o m*/ c.add(Calendar.DATE, day); return c.getTime(); } public static Date now() { Calendar cal = Calendar.getInstance(); Date currDate = cal.getTime(); return currDate; } }