Here you can find the source of maxArray(double[] input)
public static double maxArray(double[] input)
//package com.java2s; //License from project: Apache License public class Main { public static double maxArray(double[] input) { assert ((input != null) && (input.length > 0)) : "Your array is empty."; double temp = input[0]; for (int index = 0; index < input.length; index++) temp = temp < input[index] ? input[index] : temp; return temp; }//ww w . j a v a2 s .c o m }