Here you can find the source of getNextDay(Date d2)
public static Date getNextDay(Date d2)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getNextDay(Date d2) { if (d2 == null) d2 = new Date(); Calendar c1 = Calendar.getInstance(); c1.setTimeInMillis(d2.getTime() + 24 * 60 * 60 * 1000); return c1.getTime(); }// ww w . ja v a2 s . co m }