MATH IN JAVA
Java Math class provides several methods to work on math calculations like min(), max(), avg(), sin(), cos(), tan(), round(), ceil(), floor(), abs() etc. The basic methods and constructors provided by Java programming language.
Math class contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric function.
Java math method:
Math.min(): this method returns the smallest of two values.
Math.max(): this method returns the largest of two values.
Math.abs(): this method returns the absolute value of the value provided.
Math.round(): this method is used to round off the decimal numbers to the nearest value.
Math.sqrt(): this method returns the square root of a number given.
Math.cbrt(): this method returns the cube root of a given number.