Here you can find the source of min(int... array)
public static int min(int... array)
//package com.java2s; //License from project: Open Source License public class Main { public static int min(int... array) { if (array.length == 0) throw new ArrayIndexOutOfBoundsException(); int min = Integer.MAX_VALUE; for (int i : array) { if (i < min) min = i;// w w w . ja v a 2 s. com } return min; } public static long min(long... array) { if (array.length == 0) throw new ArrayIndexOutOfBoundsException(); long min = Long.MAX_VALUE; for (long l : array) { if (l < min) min = l; } return min; } public static float min(float... array) { if (array.length == 0) throw new ArrayIndexOutOfBoundsException(); float min = Float.MAX_VALUE; for (float f : array) { if (f < min) min = f; } return min; } public static double min(double... array) { if (array.length == 0) throw new ArrayIndexOutOfBoundsException(); double min = Double.MAX_VALUE; for (double d : array) { if (d < min) min = d; } return min; } }