Java Array Min Value min(int[] arr)

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

Description

min

License

Open Source License

Declaration

public static int min(int[] arr) 

Method Source Code

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

public class Main {

    public static int min(int[] arr) {
        int minIndex = 0;
        int minValue = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (minValue > arr[i]) {
                minIndex = i;//from   www .j  a  v a2s .  c o  m
                minValue = arr[i];
            }
        }
        return minIndex;
    }
}

Related

  1. min(int... vals)
  2. min(int... values)
  3. min(int... xs)
  4. min(int[] a)
  5. min(int[] arr)
  6. min(int[] arr, int count)
  7. min(int[] array)
  8. min(int[] array)
  9. min(int[] array)