Here you can find the source of min(long[] arr)
public static long min(long[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static long min(long[] arr) { if (arr.length == 0) return 0; long ret = arr[0]; for (int i = 1; i < arr.length; i++) if (arr[i] < ret) ret = arr[i];//from ww w .j av a2 s.c o m return ret; } public static int min(int[] arr) { if (arr.length == 0) return 0; int ret = arr[0]; for (int i = 1; i < arr.length; i++) if (arr[i] < ret) ret = arr[i]; return ret; } }