Here you can find the source of getHourAfter(Date date, int hour)
public static Date getHourAfter(Date date, int hour)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getHourAfter(Date date, int hour) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);// w w w.j a va2 s.c o m calendar.set(Calendar.HOUR, hour + 1); return calendar.getTime(); } }