Here you can find the source of addSeconds(int addSeconds)
public static Date addSeconds(int addSeconds)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date addSeconds(Date src, int addSeconds) { Calendar calendar = Calendar.getInstance(); calendar.setTime(src);// w ww.j a v a 2s .co m calendar.add(Calendar.SECOND, addSeconds); return calendar.getTime(); } public static Date addSeconds(int addSeconds) { return addSeconds(new Date(), addSeconds); } }