get min value from list of integer - Android java.util

Android examples for java.util:List Algorithm

Description

get min value from list of integer

Demo Code


//package com.java2s;

public class Main {
    public static int min(final int... values) {
        int min = Integer.MAX_VALUE;
        for (final int v : values) {
            min = Math.min(v, min);
        }/*w ww. java2 s  . c  om*/
        return min;
    }
}

Related Tutorials