Here you can find the source of newInstance(int year, int month, int day)
static public Date newInstance(int year, int month, int day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { static public Date newInstance(int year, int month, int day) { return newInstance(year, month, day, 0, 0, 0, 0); }/*ww w . j av a 2 s . co m*/ static public Date newInstance(int year, int month, int day, int hour, int minute) { return newInstance(year, month, day, hour, minute, 0, 0); } static public Date newInstance(int year, int month, int day, int hour, int minute, int second) { return newInstance(year, month, day, hour, minute, second, 0); } static public Date newInstance(int year, int month, int day, int hour, int minute, int second, int misecond) { Calendar c = Calendar.getInstance(); c.set(year, month, day, hour, minute, second); c.set(Calendar.MILLISECOND, misecond); return c.getTime(); } }