Here you can find the source of maxValue(double[] from)
public static double maxValue(double[] from)
//package com.java2s; //License from project: Apache License public class Main { public static double maxValue(double[] from) { double result = from[0]; for (int i = 1; i < from.length; ++i) if (from[i] > result) result = from[i];//from w w w . j av a 2 s . c o m return result; } public static float maxValue(float[] from) { return maxValue(from, 0, from.length); } public static float maxValue(float[] from, int start, int end) { float result = from[start]; for (int i = start + 1; i < end; ++i) if (from[i] > result) result = from[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; } public static int maxValue(byte[] from) { int result = from[0] & 0xFF; for (int i = 1; i < from.length; ++i) if ((from[i] & 0xFF) > result) result = from[i] & 0xFF; return result; } }