Java Array Max Value maxPrim(final int... numbers)

Here you can find the source of maxPrim(final int... numbers)

Description

max Prim

License

Open Source License

Declaration

public static int maxPrim(final int... numbers) 

Method Source Code

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

public class Main {

    public static int maxPrim(final int... numbers) {
        int max = Integer.MIN_VALUE;
        for (final int n : numbers) {
            max = Math.max(max, n);
        }// w w w .  j av  a2 s  .c o  m
        return max;
    }

    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);
        }
        return max;
    }
}

Related

  1. maxOfSortedValues(double[] sortedValues)
  2. maxOverArraySubset(double[] array, Iterable subset)
  3. maxpool(float[] curr, float[] probs)
  4. maxPosition(float[] v)
  5. maxPositive(int[] array)
  6. maxRepeating(int[] input, int k)
  7. maxRow(Object[]... arr)
  8. maxRowLen(Object[]... arr)
  9. maxSize(String[] string)