Java Array Min Value minElement(int[] array)

Here you can find the source of minElement(int[] array)

Description

min Element

License

Apache License

Declaration

public static int minElement(int[] array) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int minElement(int[] array) {

        int result = Integer.MAX_VALUE;

        for (int element : array)
            result = Math.min(result, element);

        return result;
    }/*from   w w w  .j  a v  a2 s.  com*/

    public static double min(double[] array) {

        double result = Double.MAX_VALUE;

        for (double element : array)
            result = Math.min(result, element);

        return result;
    }
}

Related

  1. minDist(double[] q, double[] c, double[][] distMatrix, int orig_n)
  2. minDistance(int[][] colors, int len, int[] color)
  3. minDouble(double a, double... others)
  4. minDouble(double... values)
  5. minDoubleArray(double[] data)
  6. minFastSort(double x[], int idx[], int n, int m)
  7. minFastSort(double[] x, int[] idx, int size)
  8. minIdx(int[] in)
  9. minIgnoreIndex(double[] array, int indexToIgnore)