Here you can find the source of getNextDay(Date date)
public static Date getNextDay(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static Date getNextDay(Date date) { return addDay(date, 1); }/*from www.ja va2 s . c o m*/ public static Date addDay(Date date, int dayAmount) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.DATE, dayAmount); return calendar.getTime(); } public static String getTime(Date date) { if (date == null) { return null; } SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss"); return format.format(date); } }