Here you can find the source of min(T[] args)
public static <T extends Comparable<T>> T min(T[] args)
//package com.java2s; //License from project: Apache License public class Main { public static <T extends Comparable<T>> T min(T[] args) { if ((args == null) || (args.length == 0)) { return null; }/*from w w w. j a va2 s . c om*/ T minus = null; for (int i = 0; i < args.length; i++) { T t = args[i]; if ((minus == null) && (t != null)) { minus = t; } else if (minus.compareTo(t) > 0) { minus = t; } } return minus; } }