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