Here you can find the source of createDate(int year, int month, int date)
public static Date createDate(int year, int month, int date)
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date createDate(int year, int month, int date) { return createCalendar(year, month, date).getTime(); }/*from ww w . j ava 2 s .c o m*/ public static Date createDate(int year, int month, int date, int hour, int minute) { return createCalendar(year, month, date, hour, minute).getTime(); } public static Date createDate(int year, int month, int date, int hour, int minute, int second) { return createCalendar(year, month, date, hour, minute, second).getTime(); } public static Calendar createCalendar(int year, int month, int date) { GregorianCalendar calendar = new GregorianCalendar(); calendar.set(year, month - 1, date); return calendar; } public static Calendar createCalendar(int year, int month, int date, int hour, int minute) { GregorianCalendar calendar = new GregorianCalendar(); calendar.set(year, month - 1, date, hour, minute); return calendar; } public static Calendar createCalendar(int year, int month, int date, int hour, int minute, int second) { GregorianCalendar calendar = new GregorianCalendar(); calendar.set(year, month - 1, date, hour, minute, second); return calendar; } }