Java Math class has many methods that allow you to perform mathematical operations.
example:
public class JavaApplication {
public static void main(String[] args) {
Math.max(15, 2); //get the max value : 15
Math.min(5, 20); //get min value : 5
Math.sqrt(12); //get the square root: 3.46
Math.abs(-8.7); // absolute (positive) value: 8.7
Math.random(); // returns a random number : 0.10
}
}