how to use max in java code example
Example 1: math maximum java
Math.max(a, b);
// a & b = int, double, float, or long
Example 2: java max
public class Test {
public static void main(String args[]) {
System.out.println(Math.max(12.123, 12.456));
System.out.println(Math.max(23.12, 23.0));
}
}