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