Here you can find the source of min(int[] x, int length)
public static int min(int[] x, int length)
//package com.java2s; //License from project: BSD License public class Main { public static int min(int[] x, int length) { int m = Integer.MAX_VALUE; for (int i = 0; i < length; i++) if (x[i] < m) m = x[i];/*from www.j av a 2 s. com*/ return m; } public static int min(int[] x) { return min(x, x.length); } public static double min(double[] x, int length) { double m = Double.POSITIVE_INFINITY; for (int i = 0; i < length; i++) if (x[i] < m) m = x[i]; return m; } }