Get max value from list of integer - Android java.util

Android examples for java.util:List Algorithm

Description

Get max value from list of integer

Demo Code


//package com.java2s;

public class Main {
    public static int max(final int... values) {
        int max = Integer.MIN_VALUE;
        for (final int v : values) {
            max = Math.max(v, max);
        }//from   w  w w . j  ava 2s.c  om
        return max;
    }
}

Related Tutorials