Here you can find the source of getFutureDate(int seconds)
public static Date getFutureDate(int seconds) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.util.Calendar; import java.util.Date; public class Main { public static Date getFutureDate(int seconds) throws ParseException { Calendar now = Calendar.getInstance(); now.add(Calendar.SECOND, seconds); // 24 hours format return now.getTime(); }//from w w w . j a v a2s . c o m }