Here you can find the source of min(T a, T b)
public static <T extends Comparable<T>> T min(T a, T b)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . j a va2 s. c om*/ * Generalized version of Math.min */ public static <T extends Comparable<T>> T min(T a, T b) { if (a.compareTo(b) <= 0) return a; return b; } }