Java Array Min Value min_of_ints(int[] data)

Here you can find the source of min_of_ints(int[] data)

Description

Returns min of an array of ints

License

Open Source License

Parameter

Parameter Description
data a parameter

Declaration

public static int min_of_ints(int[] data) 

Method Source Code

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

public class Main {
    /**//from w  ww.  jav a2  s  .  c  om
     * Returns min of an array of ints
     * 
     * @param data
     * @return
     */
    public static int min_of_ints(int[] data) {
        int min = data[0];
        for (int x = 1; x < data.length; x++) {
            if (data[x] < min) {
                min = data[x];
            }
        }
        return min;
    }
}

Related

  1. min(T first, T... others)
  2. min(T... values)
  3. min(T[] args)
  4. min(T[] inputArray, int i, int i0)
  5. min_max_mean_stddev(long[] counts)
  6. minAndMaxOfArray(float[] array)
  7. minarr(double[] a)
  8. minArray(int[] arr)
  9. minCeilDiv(int c, int... vals)