Here you can find the source of min(int[] arr)
public static int min(int[] arr)
//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; } }