What will be the output of Math.floor(-20.10);?
Math.floor(-20.10);
5 Likes
-21.0
Reason — Math.floor() method returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. Thus, -21.0 is returned by Math.floor(-20.10); method.
Answered By
2 Likes
Which of the following is mandatory in the switch statement?
Which of the following is not a valid method of the Scanner class?
Which of the following is/are jump statement used in Java?