Here you can find the source of getCurrentDate()
public static Date getCurrentDate()
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getCurrentDate() { Calendar c = Calendar.getInstance(); Date date = c.getTime();/*w ww .j ava 2s . c om*/ return date; } }