Here you can find the source of setToTime(Calendar calendar, int hours, int minutes)
public static void setToTime(Calendar calendar, int hours, int minutes)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static void setToTime(Calendar calendar, int hours, int minutes) { calendar.set(Calendar.HOUR_OF_DAY, hours); calendar.set(Calendar.MINUTE, minutes); }/* ww w.j av a 2 s . c o m*/ public static Date setToTime(Date date, int hours, int minutes) { Calendar calendar = Calendar.getInstance(); return calendar.getTime(); } }