Here you can find the source of max(byte[] arr)
public static byte max(byte[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static byte max(byte[] arr) { byte maxValue = Byte.MIN_VALUE; for (byte value : arr) { if (value > maxValue) { maxValue = value;/* w w w .ja va 2s . co m*/ } } return maxValue; } public static short max(short[] arr) { short maxValue = Short.MIN_VALUE; for (short value : arr) { if (value > maxValue) { maxValue = value; } } return maxValue; } }