KnowledgeBoat Logo

Output Questions for Class 10 ICSE Computer Applications

Predict the output of the following:

System.out.println(Math.floor(-0.88));

Java

Java Math Lib Methods

ICSE

45 Likes

Answer

-1.0

Working

Math.floor method returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. As -1.0 is the largest mathematical integer less than -0.88 so it is the output.

Answered By

18 Likes