Here you can find the source of min(final Calendar... calendars)
public static Calendar min(final Calendar... calendars)
//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:/*from ww w .j ava 2 s . co m*/ * Ernan Hughes - initial API and implementation *******************************************************************************/ import java.util.Arrays; import java.util.Calendar; import java.util.Collections; import java.util.Vector; public class Main { public static Calendar min(final Calendar... calendars) { Vector<Calendar> list = new Vector<Calendar>( Arrays.asList(calendars)); Collections.sort(list); return list.firstElement(); } }