Here you can find the source of setHour(java.util.Date date, Integer hour)
public static java.util.Date setHour(java.util.Date date, Integer hour)
//package com.java2s; import java.util.Calendar; public class Main { public static java.util.Date setHour(java.util.Date date, Integer hour) { java.util.Calendar cal = Calendar.getInstance(); cal.setTime(date);//from w w w . ja v a 2s .c o m cal.set(Calendar.HOUR, hour); return cal.getTime(); } }