Here you can find the source of min(int[] values)
public static int min(int[] values)
//package com.java2s; public class Main { public static int min(int[] values) { int min = Integer.MAX_VALUE; for (int i = 0; i < values.length; i++) { if (values[i] < min) { min = values[i];/* ww w .j av a 2 s . com*/ } } return min; } public static int min(int[][] values) { int min = Integer.MAX_VALUE; for (int i = 0; i < values.length; i++) { for (int j = 0; j < values[i].length; j++) { if (values[i][j] < min) { min = values[i][j]; } } } return min; } }