Here you can find the source of findMax2(int[] workArray, int idx, int max)
private static int findMax2(int[] workArray, int idx, int max)
//package com.java2s; //License from project: Open Source License public class Main { private static int findMax2(int[] workArray, int idx, int max) { if (idx <= 0) return max; return findMax2(workArray, idx - 1, Math.max(max, workArray[idx - 1])); }/* w ww . j a v a 2 s .co m*/ }