Here you can find the source of min(Comparable c1, Comparable c2)
public static Object min(Comparable c1, Comparable c2)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static Object min(Comparable c1, Comparable c2) { if (c1 != null && c2 != null) { return c1.compareTo(c2) < 1 ? c1 : c2; } else {/*from ww w. ja va2 s . com*/ return c1 != null ? c1 : c2; } } }