Here you can find the source of getTimeNextDay(long lTimeMillis)
public static long getTimeNextDay(long lTimeMillis)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static long getTimeNextDay(long lTimeMillis) { Date date = new Date(lTimeMillis); Calendar cal = Calendar.getInstance(); cal.setTime(date);//from w w w .ja v a 2s . c om cal.add(Calendar.DAY_OF_YEAR, 1); Date dateNext = cal.getTime(); return dateNext.getTime(); } }