java math min max code example
Example 1: math minimum java
Math.min(a, b);
// a & b = int, double, long, or float
Example 2: math maximum java
Math.max(a, b);
// a & b = int, double, float, or long
Example 3: math max java
// Math.max(a, b);
dataType max(dataType num1, dataType num2)
The datatypes can be int, float, double or long.
Parameters : The function accepts two parameters num1 and num2
among which the maximum is returned.