- Home
- Output Questions for Class 10 ICSE Computer Applications
Predict the output of the following:
Output Questions for Class 10 ICSE Computer Applications
Predict the output of the following:
System.out.println(Math.ceil(-0.95));
Answer
-0.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. If the argument value is less than zero but greater than -1.0, then the result is negative zero which is the case in this question.