Here you can find the source of max(Number... array)
public static Number max(Number... array)
//package com.java2s; //License from project: Apache License public class Main { public static Number max(Number... array) { Number max = array[0];//from w ww. ja v a 2s .c o m for (int j = 1; j < array.length; j++) { if (array[j].doubleValue() > max.doubleValue()) { max = array[j]; } } return max; } }