Here you can find the source of addDayOfMonth(Date date, int difference)
public static Date addDayOfMonth(Date date, int difference)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date addDayOfMonth(Date date) { Calendar calendar = calendarDate(date); calendar.add(Calendar.DAY_OF_MONTH, 1); return calendar.getTime(); }// w w w . j a v a2 s.com public static Date addDayOfMonth(Date date, int difference) { Calendar calendar = calendarDate(date); calendar.add(Calendar.DAY_OF_MONTH, difference); return calendar.getTime(); } public static Calendar calendarDate(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar; } }