Here you can find the source of max(final Number... numbers)
public static Number max(final Number... numbers)
//package com.java2s; //License from project: Open Source License public class Main { public static Number max(final Number... numbers) { double max = Double.MIN_VALUE; for (final Number n : numbers) { final double d = n.doubleValue(); max = Math.max(max, d); }/*from ww w .j a v a 2 s . co m*/ return max; } }