Here you can find the source of max(int[] vals, int max)
private static int max(int[] vals, int max)
//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; } }