Java Array Min Value min(final int... array)

Here you can find the source of min(final int... array)

Description

Find minimum out of Integer array

License

Open Source License

Parameter

Parameter Description
array a parameter

Return

int

Declaration

public static int min(final int... array) 

Method Source Code

//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;
    }
}

Related

  1. min(final double[] tab)
  2. min(final double[] target)
  3. min(final double[] vec)
  4. min(final double[] vector)
  5. min(final float[] a, final float[] b)
  6. min(final int... integers)
  7. min(final int... numbers)
  8. min(final int... values)
  9. min(final int[] arr)