Java Array Min Value minValue(int[] values)

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

Description

min Value

License

Apache License

Declaration

private static int minValue(int[] values) 

Method Source Code

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

public class Main {
    private static int minValue(int[] values) {
        int min = 255;

        for (int i = 0; i < values.length; i++) {
            if (values[i] < min && values[i] != 0) {
                min = values[i];//w w w. j  a v a 2s . c  om
            }
        }

        return min;
    }
}

Related

  1. minValue(double[] values)
  2. minValue(double[] values)
  3. minValue(final int[] arr)
  4. minValue(float[] arr)
  5. minValue(int[] array)
  6. minValue(long[] array)
  7. minX(final float[] vertices)