Java Array Min Value min(double[] arr)

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

Description

min

License

Open Source License

Declaration

static public double min(double[] arr) 

Method Source Code


//package com.java2s;
import java.util.ArrayList;

public class Main {
    static public double min(double[] arr) {
        double max = Double.MAX_VALUE;
        for (double x : arr)
            max = Math.max(max, x);

        return max;
    }/* www.  j a v  a2  s. c o m*/

    static public int max(int[] arr) {
        int max = Integer.MIN_VALUE;
        for (int i : arr)
            max = Math.max(max, i);

        return max;
    }

    static public int max(ArrayList<Integer> arrlist) {
        int max = Integer.MIN_VALUE;
        for (int i : arrlist)
            max = Math.max(max, i);

        return max;
    }

    static public double max(double[] arr) {
        double max = Double.MIN_VALUE;
        for (double x : arr)
            max = Math.max(max, x);

        return max;
    }
}

Related

  1. min(double... ds)
  2. min(double... nums)
  3. min(double... value)
  4. min(double[] a)
  5. min(double[] a, double[] b)
  6. min(double[] arr)
  7. min(double[] array)
  8. min(double[] array)
  9. min(double[] array)