Java Array Min Value min(int... _is)

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

Description

Takes and returns the minimum value from the given args.

License

Mozilla Public License

Parameter

Parameter Description
_is the values to compare

Return

the minimum of the given values

Declaration

public static int min(int... _is) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

public class Main {
    /**/*from   w  w  w.  j  a v  a2s.  c  om*/
     * Takes and returns the minimum value from the given args.
     *
     * @param _is
     *            the values to compare
     * @return the minimum of the given values
     */
    public static int min(int... _is) {
        int min = Integer.MAX_VALUE;
        for (int i : _is)
            if (min > i)
                min = i;
        return min;
    }
}

Related

  1. min(float[] v1, float[] v2)
  2. min(float[][] a)
  3. min(float[][] originalValues, float[][] newValues, int[] indexArray, float value)
  4. min(int receiver, int... others)
  5. min(int value1, int value2, int... values)
  6. min(int... arr)
  7. min(int... array)
  8. min(int... array)
  9. min(int... list)