Here you can find the source of create(final int year, final int month, final int day)
public static Calendar create(final int year, final int month, final int day)
//package com.java2s; /******************************************************************************* * Copyright (c) 2009 Lifeform Software. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/* ww w.j a v a 2 s . co m*/ * Ernan Hughes - initial API and implementation *******************************************************************************/ import java.util.Calendar; public class Main { public static Calendar create(final int year, final int month, final int day) { return create(year, month, day, 0, 0, 0); } public static Calendar create(final int year, final int month, final int dayOfMonth, final int hourOfDay, final int minute, final int second) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(year, month - 1, dayOfMonth, hourOfDay, minute, second); return calendar; } public static Calendar create(final int year, final int month, final int dayOfMonth, final int hourOfDay, final int minute, final int second, final int milliSecond) { Calendar calendar = create(year, month - 1, dayOfMonth, hourOfDay, minute, second); calendar.set(Calendar.MILLISECOND, milliSecond); return calendar; } }