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

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

Description

max

License

Creative Commons License

Declaration

public static int max(int... values) 

Method Source Code

//package com.java2s;
// The license under which this software is released can be accessed at:

public class Main {
    public static int max(int... values) {
        int tmp = values[0];
        for (int i = 1; i < values.length; i++) {
            if (values[i] > tmp) {
                tmp = values[i];/* w  w w . ja  va2 s . com*/
            }
        }
        return tmp;
    }
}

Related

  1. max(int value1, int value2, int... values)
  2. max(int... _is)
  3. max(int... args)
  4. max(int... array)
  5. max(int... list)
  6. max(int... values)
  7. max(int... values)
  8. max(int... values)
  9. max(int... xs)