Java Array Min Value min(final int[] values)

Here you can find the source of min(final int[] values)

Description

Finds the minimum value from a set of integers.

License

Open Source License

Parameter

Parameter Description
values the set of values values

Return

the int lowest value

Declaration

public static int min(final int[] values) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from w  w  w . j  a  v  a2  s .c  o m*/
     * Finds the minimum value from a set of integers.
     * 
     * @param values the set of values values
     * @return the int lowest value
     */
    public static int min(final int[] values) {
        int m = Integer.MAX_VALUE;
        for (int v : values) {
            if (v < m) {
                m = v;
            }
        }
        return m;
    }
}

Related

  1. min(final int... integers)
  2. min(final int... numbers)
  3. min(final int... values)
  4. min(final int[] arr)
  5. min(final int[] values)
  6. min(final long[] array)
  7. min(final Number... numbers)
  8. min(final T... elements)
  9. min(float a[][][])