Here you can find the source of arrayMax(int[] property)
public static int arrayMax(int[] property)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static int arrayMax(int[] property) { int[] copy = property.clone(); int max = 0; int numElements = copy.length; Arrays.sort(copy);/*from w w w .j a v a 2s . c o m*/ if (numElements > 0) max = copy[numElements - 1]; return max; } }