0% found this document useful (0 votes)
7 views

Applications of The Math Class Classes

Uploaded by

Kent Ally Rebusa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Applications of The Math Class Classes

Uploaded by

Kent Ally Rebusa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Applications of the Math Class Classes, Objects, and Methods

Java Math class provides several methods to work on math calculations like min (),

max (), avg (), sin (), cos (), tan (), round (), ceil (), floor (), abs () etc. In this way,

we will learn about the Java Math class, its basic methods and constructors

provided by Java programming language.

The Java Math class provides more advanced mathematical calculations than what

the basic Java math operators provide. The Math class contains methods for

finding the maximum or minimum of two values, rounding values, logarithmic

functions, square root, and trigonometric functions (sin, cos, tan). etc.

Example: int higherNum = Math.max(7, 9);

This method (Math.max () ) will determine maximum (higher) value between int

values 7 and 9.

Because of this encountering mathematical calculation in java is a lot easier since

different types of methods are present in the java math class ().

You might also like