Here you can find the source of max(final int[] values)
Parameter | Description |
---|---|
values | the list of integer values |
public static int max(final int[] values)
//package com.java2s; //License from project: Open Source License public class Main { /**// ww w . jav a 2 s . c o m * Finds that maximum of a list of integers. * * @param values the list of integer values * @return the greatest of all integers */ public static int max(final int[] values) { int m = Integer.MIN_VALUE; for (int v : values) { if (v > m) { m = v; } } return m; } }