Here you can find the source of min(int... values)
public static int min(int... values)
//package com.java2s; //License from project: Apache License public class Main { public static int min(int... values) { if (values.length < 2) { return values[0]; }//from www . ja va 2 s. c om int result = Math.min(values[0], values[1]); for (int i = 2; i < values.length; i++) { result = Math.min(result, values[i]); } return result; } public static long min(long... values) { if (values.length < 2) { return values[0]; } long result = Math.min(values[0], values[1]); for (int i = 2; i < values.length; i++) { result = Math.min(result, values[i]); } return result; } public static float min(float... values) { if (values.length < 2) { return values[0]; } float result = Math.min(values[0], values[1]); for (int i = 2; i < values.length; i++) { result = Math.min(result, values[i]); } return result; } public static double min(double... values) { if (values.length < 2) { return values[0]; } double result = Math.min(values[0], values[1]); for (int i = 2; i < values.length; i++) { result = Math.min(result, values[i]); } return result; } }