KnowledgeBoat Logo
|

Computer Applications

State the value and type of each expression.

Math.max(1.5e-2, 0.095)

Java Math Lib Methods

6 Likes

Answer

The output value is 0.095. The type of expression is double.

Explanation

Math.max(a, b) returns the maximum of a and b. As 0.095 is greater than 1.5e-2, hence, 0.095 is the output. Since the argument is double so the data type of return value is also double.

Answered By

4 Likes


Related Questions