Java Array Max Value max(double... values)

Here you can find the source of max(double... values)

Description

max

License

Open Source License

Declaration

public static double max(double... values) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double max(double... values) {
        if (values == null || values.length <= 0) {
            throw new IllegalArgumentException();
        }/*from  w  w w  .  j  a v  a 2  s.  c  om*/
        double max = values[0];
        for (double value : values) {
            if (value > max) {
                max = value;
            }
        }
        return max;
    }
}

Related

  1. max(double... ds)
  2. max(double... elems)
  3. max(double... nums)
  4. max(double... values)
  5. max(double... values)
  6. max(double[] a)
  7. max(double[] arr)
  8. max(double[] array)
  9. max(double[] array)