获取数组中的最小值。
/* from nowjava.com*/ //package com.nowjava; public class Main { /** * Gets the minimum value in the array. * @param input * @return */ public static double min(double[] input) { double min = Double.MAX_VALUE; for (int i = 0; i < input.length; i++) { if (input[i] < min) { min = input[i]; } } return min; } }