Here you can find the source of getCurrentDate()
public static Date getCurrentDate()
//package com.java2s; //License from project: Open Source License import java.sql.Date; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static Date getCurrentDate() { Calendar c = new GregorianCalendar(); return new Date(c.getTimeInMillis()); }//from w w w . jav a2 s. c o m }