Say I have the following three constants:
final static int MY_INT1 = 25; final static int MY_INT2 = -10; final static double MY_DOUBLE1 = 15.5;
Java 8 way. Works for multiple parameters:
Stream.of(first, second, third).max(Integer::compareTo).get()