Computer Applications
Predict the output of the following:
System.out.println(Math.ceil(65.5));
Java
Java Math Lib Methods
25 Likes
Answer
66.0
Working
Math.ceil method returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Here 66.0 is the smallest mathematical integer greater than 65.5 so it is the output.
Answered By
12 Likes
Related Questions
Predict the output of the following:
System.out.println(Math.rint(98.5));
Predict the output of the following:
System.out.println(Math.max(-77.66, -87.45));
Predict the output of the following:
System.out.println(Math.round(-18.51));
Predict the output of the following:
System.out.println(Math.floor(-0.88));