Here you can find the source of getToday(int hour, int minute, int second)
public static Date getToday(int hour, int minute, int second)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getToday(int hour, int minute, int second) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.SECOND, second); //calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); }//from ww w.j av a 2 s . c o m }