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