Java Array Max Value max(int[] vals, int max)

Here you can find the source of max(int[] vals, int max)

Description

max

License

Open Source License

Declaration

private static int max(int[] vals, int max) 

Method Source Code

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

public class Main {
    private static int max(int[] vals, int max) {
        for (int i = 0; i < vals.length; i++) {
            int v = vals[i];
            if (v > max) {
                max = v;//  w  w w .j av  a  2s . c  o  m
            }
        }
        return max;
    }
}

Related

  1. max(int[] ids)
  2. max(int[] in, int x1, int x2)
  3. max(int[] list)
  4. max(int[] nums)
  5. max(int[] t)
  6. max(int[] values)
  7. max(int[] values)
  8. max(int[] values)
  9. max(int[] values)