Here you can find the source of getTomorrowSixHours()
public static Date getTomorrowSixHours()
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { private static SimpleDateFormat dayFormater = new SimpleDateFormat("yyyy-MM-dd"); public static Date getTomorrowSixHours() { Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_YEAR, 1); c.add(Calendar.HOUR_OF_DAY, 6); Date date = c.getTime();//from www . j a va2 s .co m String t = dayFormater.format(date); try { date = dayFormater.parse(t); } catch (ParseException e) { e.printStackTrace(); } return date; } }