Here you can find the source of arrayMax(double[] x)
public static double arrayMax(double[] x)
//package com.java2s; //License from project: Open Source License public class Main { public static double arrayMax(double[] x) { if (x.length == 0) { throw new IllegalArgumentException(); }//from www. j a v a2 s. c o m double result = x[0]; for (int i = 1; i < x.length; i++) { if (result < x[i]) { result = x[i]; } } return result; } }