Here you can find the source of maxValue(double[] ary)
public static double maxValue(double[] ary)
//package com.java2s; //License from project: Apache License public class Main { public static double maxValue(double[] ary) { return maxValue(ary, 0, ary.length); }//from w ww . j av a2 s.com public static double maxValue(double[] ary, int from, int to) { double result = ary[from]; for (int i = from + 1; i < to; ++i) if (ary[i] > result) result = ary[i]; return result; } public static float maxValue(float[] ary) { return maxValue(ary, 0, ary.length); } public static float maxValue(float[] ary, int from, int to) { float result = ary[from]; for (int i = from + 1; i < to; ++i) if (ary[i] > result) result = ary[i]; return result; } public static long maxValue(long[] from) { long result = from[0]; for (int i = 1; i < from.length; ++i) if (from[i] > result) result = from[i]; return result; } }