Java Array Min Value min(double[] array)

Here you can find the source of min(double[] array)

Description

min

License

Open Source License

Declaration

public static double min(double[] array) 

Method Source Code

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

public class Main {
    public static double min(double[] array) {
        if (array.length == 0)
            throw new IllegalArgumentException("length cannot be 0.");
        double maxElement = Double.POSITIVE_INFINITY;
        for (double d : array) {
            if (d < maxElement)
                maxElement = d;// www.j ava2s. c o m
        }
        return maxElement;
    }
}

Related

  1. min(double[] arr)
  2. min(double[] array)
  3. min(double[] array)
  4. min(double[] array)
  5. min(double[] array)
  6. min(double[] array)
  7. min(double[] array)
  8. min(double[] array)
  9. min(double[] array)