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

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

Description

min

License

Creative Commons License

Declaration

public static int min(int... array) 

Method Source Code

//package com.java2s;
// The license under which this software is released can be accessed at:

public class Main {
    public static int min(int... array) {
        if (array.length == 0) {
            return 0;
        }//from w  ww .  j av  a2  s .c om
        int value = array[0];
        for (int tmp : array) {
            if (tmp < value) {
                value = tmp;
            }
        }
        return value;
    }
}

Related

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