Here you can find the source of maxArray(int[] arr)
public static int maxArray(int[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static int maxArray(int[] arr) { int retVal = arr[0]; for (int i = 1; i < arr.length; i++) { if (arr[i] > retVal) retVal = arr[i];//from ww w .j av a2 s .c om } return retVal; } }