Here you can find the source of date(int year, int month, int day)
public static Date date(int year, int month, int day)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date date(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day, 0, 0, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); }/* ww w .ja v a 2 s . c o m*/ public static Date date(int year, int month, int day, int hour, int minute, int second) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day, hour, minute, second); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } }