Java Array Max Value max(Number... array)

Here you can find the source of max(Number... array)

Description

max

License

Apache License

Declaration

public static Number max(Number... array) 

Method Source Code

//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;
    }
}

Related

  1. max(int[] x, int length)
  2. max(Long john, Long... jane)
  3. max(long[] array)
  4. max(long[] array)
  5. max(long[] array)
  6. max(Number[] array)
  7. max(T first, T... others)
  8. max(T... elems)
  9. max(T... values)