Here you can find the source of getTimestamp()
public static Date getTimestamp()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static Date getTimestamp() { return new java.sql.Timestamp(Calendar.getInstance().getTime().getTime()); }//from www . ja va 2 s .c o m }