获取数组中的最大值。
/** from * 时代Java公众号 - nowjava.com **/ //package com.nowjava; public class Main { /** * Gets the maximum value in the array. * @param input * @return */ public static short max(short[] input) { short max = Short.MIN_VALUE; for (int i = 0; i < input.length; i++) { if (input[i] > max) { max = input[i]; } } return max; }/* from n o w j a v a . c o m*/ /** * Gets the maximum value in the array. * @param input * @return */ public static double max(double[] input) { double max = -Double.MAX_VALUE; for (