Computer Applications
State the value and type of each expression.
Math.ceil(4.002)
Java Math Lib Methods
3 Likes
Answer
The output value is 5.0. The type of expression is double.
Explanation
Math.ceil(x) returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Hence, output is 5.0 and data type of result is double.
Answered By
2 Likes