Here you can find the source of min(int... arr)
public static int min(int... arr)
//package com.java2s; /**/* w ww . java2 s.com*/ * Copyright (c) Lambda Innovation, 2013-2015 * ?????????Lambda Innovation??? * http://www.li-dev.cn/ * * This project is open-source, and it is distributed under * the terms of GNU General Public License. You can modify * and distribute freely as long as you follow the license. * ?????????????????GNU????????????? * ???????????????????????????? * http://www.gnu.org/licenses/gpl.html */ public class Main { public static int min(int... arr) { int min = Integer.MAX_VALUE; for (int i : arr) if (i < min) min = i; return min; } public static double min(double... arr) { double min = Double.MAX_VALUE; for (double d : arr) if (d < min) min = d; return min; } }