Java StrictMath.max(long a, long b)
Syntax
StrictMath.max(long a, long b) has the following syntax.
public static long max(long a, long b)
Example
In the following code shows how to use StrictMath.max(long a, long b) method.
/*www. j a v a2 s. c o m*/
public class Main {
public static void main(String[] args) {
long l1 = 1234567890987654321L, l2 = 9876543212435L, l3 = -9876543212435L;
System.out.println(StrictMath.max(l1, l2));
System.out.println(StrictMath.max(l1, l3));
}
}
The code above generates the following result.