Android examples for java.lang:Integer
get Max Num in varied parameters
import java.util.Arrays; public class Main{ public static int getMaxNum(int... num) { if (num == null || num.length == 0) { return -1; }//from ww w .j a v a 2s . co m Arrays.sort(num); return num[num.length - 1]; } }