Here you can find the source of max(final long[] longs)
Parameter | Description |
---|---|
longs | the array to search. |
public static long max(final long[] longs)
//package com.java2s; //License from project: Apache License public class Main { /**/*from www .j a v a 2s . c om*/ * Get the maximum element in an array of longs. * @param longs the array to search. * @return the maximum value in the array. */ public static long max(final long[] longs) { long max = 0l; for (int j = 0; j < longs.length; j++) { max = (longs[j] > max) ? longs[j] : max; } return max; } }