what is the output ? Math.floor(-2.1)
a)2
b)-2
c)-3.0
d)0
Answer Posted / 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 |
Post New Answer View All Answers
explain multi-threading in java?
What is constructor and its types?
What are local variables?
What are kinds of processors?
What is array pointers ?
What is currentthread()?
What is implicit object in java?
What is jit and its use?
What exactly is a .class file?
what is inner class in java?
Why hashmap is used in java?
What are the methods available in a class?
What are the different conditional statements?
Why are the objects immutable in java?
What is the protected method modifier?