Here you can find the source of minComparable(T first, T second)
public static <T extends Comparable<T>> T minComparable(T first, T second)
//package com.java2s; /**//from w w w .ja va 2 s . c o m * Copyright (c) 2010-2017 by the respective copyright holders. * * 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 */ public class Main { public static <T extends Comparable<T>> T minComparable(T first, T second) { return first.compareTo(second) <= 0 ? first : second; } }