Here you can find the source of min(final int... array)
Parameter | Description |
---|---|
array | a parameter |
public static int min(final int... array)
//package com.java2s; //License from project: Open Source License public class Main { /**//from www. ja v a 2 s . c o m * Find minimum out of Integer array * * @param array * @return {@link int} */ public static int min(final int... array) { if (array == null) { return 0; } int min = array[0]; for (int i = 0; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; } }