KnowledgeBoat Logo
|

Computer Applications

Give the output of Math.ceil(-0.6)

  1. -1.6
  2. -1.5
  3. -1.0
  4. -0.0

Java Math Lib Methods

15 Likes

Answer

-0.0

Reason — Math.ceil method returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Thus, Math.ceil(-0.6) returns -0.0.

Answered By

9 Likes


Related Questions