Java tutorial
//package com.java2s; public class Main { public static double max(double[] input) { double max = Double.MIN_VALUE; for (int i = 0; i < input.length; i++) { if (input[i] > max) { max = input[i]; } } return max; } }