Here you can find the source of getDateAfter(Date date, int minute)
public static Date getDateAfter(Date date, int minute)
//package com.java2s; import java.util.*; public class Main { public static Date getDateAfter(Date date, int minute) { Calendar calendar = Calendar.getInstance(); if (date != null) { calendar.setTime(date);//from w ww .j a va2 s. c o m } else { calendar.setTime(new Date()); } calendar.add(Calendar.MINUTE, minute); return calendar.getTime(); } }