Java Array Max Value max(int... _is)

Here you can find the source of max(int... _is)

Description

Takes and returns the maximum value from the given args.

License

Mozilla Public License

Parameter

Parameter Description
_is the values to compare

Return

the maximum of the given values

Declaration

public static int max(int... _is) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

public class Main {
    /**/*from   ww w.jav a 2 s  .c  o m*/
     * Takes and returns the maximum value from the given args.
     *
     * @param _is
     *            the values to compare
     * @return the maximum of the given values
     */
    public static int max(int... _is) {
        int max = Integer.MIN_VALUE;
        for (int i : _is)
            if (max < i)
                max = i;
        return max;
    }
}

Related

  1. max(float[] position, int x)
  2. max(float[] t)
  3. max(float[] v1, float[] v2)
  4. max(int array[])
  5. max(int value1, int value2, int... values)
  6. max(int... args)
  7. max(int... array)
  8. max(int... list)
  9. max(int... values)