Java StrictMath.max(int a, int b)
Syntax
StrictMath.max(int a, int b) has the following syntax.
public static int max(int a, int b)
Example
In the following code shows how to use StrictMath.max(int a, int b) method.
//from www.j a va 2 s . c om
public class Main {
public static void main(String[] args) {
int i1 = 45 , i2 = 23, i3 = -12;
System.out.println(StrictMath.max(i1, i2));
System.out.println(StrictMath.max(i1, i3));
}
}
The code above generates the following result.