Java examples for Collection Framework:Array Search
Gets the minimum value in the array.
//package com.java2s; public class Main { /**/*from www . jav a2s . c o m*/ * 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; } }