The Java Math class has many methods that allows you to perform mathematical tasks on numbers.
Math.max(x,y)
The Math.max(
x,
y)
method can be used to find the highest value of x and y:
Example
Math.max(5, 10);
The Java Math class has many methods that allows you to perform mathematical tasks on numbers.
The Math.max(
x,
y)
method can be used to find the highest value of x and y:
Math.max(5, 10);