Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static int getMax(int... vals) { int max = Integer.MIN_VALUE; for (int i : vals) if (i > max) max = i; return max; } }