Here you can find the source of max(double[] data)
public static double max(double[] data)
//package com.java2s; //License from project: Apache License public class Main { public static double max(double[] data) { double m = Double.NEGATIVE_INFINITY; for (int i = 0; i < data.length; i++) if (data[i] > m) m = data[i];//from www. jav a2s. com return m; } }