what is the output ? Math.floor(-2.1)
a)2
b)-2
c)-3.0
d)0
Answers were Sorted based on User's Feedback
Answer / amarnath88888
Math.floor(x) function will return the nearest integer which
is less than the passed value x.
Since -3.0 < -2.1,
-3.0 is the nearest smallest integer.
so answer is c)-3.0
| Is This Answer Correct ? | 28 Yes | 2 No |
What is the driver class?
How many bits is a boolean?
Can we call the constructor of a class more than once for an object?
Can we start a thread twice in java?
What is the maximum size of list in java?
Which is dependent variable?
What is ResourceBundle class?
What is difference between equals and hashcode method?
difference between jsp and java script?
What is a modifier?
What is a boolean field?
Can we restart a dead thread in java?