Here you can find the source of maxValue(int[] arr)
private static int maxValue(int[] arr)
//package com.java2s; //License from project: Open Source License public class Main { private static int maxValue(int[] arr) { int max = arr[0]; for (int i : arr) { if (i > max) { max = i;/* ww w. j a v a 2 s .c o m*/ } } return max; } }