Computer Applications

State the value and type of each expression.

Math.min(-5, 1.0)

Java Math Lib Methods

4 Likes

Answer

The output value is -5.0. The type of expression is double.

Explanation

Math.min(a, b) returns the minimum of a and b. As one of the arguments is of double type hence, data type of return value is also double.

Answered By

2 Likes


Related Questions