Here you can find the source of getDateAfter(Date date, long offset)
public static Date getDateAfter(Date date, long offset)
//package com.java2s; import java.util.*; public class Main { public static Date getDateAfter(Date date, long offset) { long offsettime = 1000 * 60 * 60 * 24 * offset; long t = date.getTime() + offsettime; return new Date(t); }//from ww w . j a v a2 s .co m public String getTime() { java.sql.Time ent = new java.sql.Time(System.currentTimeMillis()); return ent.toString(); } }