Java Array Min Value min(byte[] arr)

Here you can find the source of min(byte[] arr)

Description

min

License

Open Source License

Declaration

public static byte min(byte[] arr) 

Method Source Code

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

public class Main {
    public static byte min(byte[] arr) {
        byte minValue = Byte.MAX_VALUE;
        for (byte value : arr) {
            if (value < minValue) {
                minValue = value;/*from w w  w  . j a  v a 2s  .c  o m*/
            }
        }
        return minValue;
    }

    public static short min(short[] arr) {
        short minValue = Short.MAX_VALUE;
        for (short value : arr) {
            if (value < minValue) {
                minValue = value;
            }
        }
        return minValue;
    }
}

Related

  1. findMinIndex(double[] arr, int offset, int length)
  2. maxLength(T[] array)
  3. maxMinValues(int[] array)
  4. maxMinValues(long[] array)
  5. maxValue(long[] array)
  6. min(byte[] array)
  7. min(byte[] values)
  8. min(double values[], boolean[] mask)
  9. min(double values[], int size)