1/* w w w . j a va 2s . c om*/
2import java.util.Calendar;
3import java.util.Date;
4
5public class Main {
6
7 public static void main(String[] args) {
8 System.out.println(addSeconds(new Date(), 100));
9 }
10
11 public static Date addSeconds(Date date, Integer seconds) {
12 Calendar cal = Calendar.getInstance();
13 cal.setTime(date);
14 cal.add(Calendar.SECOND, seconds);
15 return cal.getTime();
16 }
17}
18