Here you can find the source of min(int... list)
Parameter | Description |
---|---|
list | list of integer |
public static int min(int... list)
//package com.java2s; //License from project: LGPL public class Main { /**/*from w ww .j av a 2 s . c om*/ * Retrieves the minimum integer in the list. * * @param list * list of integer * @return the minimum integer */ public static int min(int... list) { int min = list[0]; for (int i : list) { if (i < min) { min = i; } } return min; } /** * Retrieves the minimum long integer in the list * * @param list * list of long integer * @return the minimum long integer */ public static long min(long... list) { long min = list[0]; for (long i : list) { if (i < min) { min = i; } } return min; } /** * Retrieves the minimum double in the list * * @param list * list of double * @return the minimum double */ public static double min(double... list) { double min = list[0]; for (double i : list) { if (i < min) { min = i; } } return min; } }