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;
You can do like this:
public static void main(String[] args) { int x=2 , y=7, z=14; int max1= Math.max(x,y); System.out.println("Max value is: "+ Math.max(max1, z)); }