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 return in java?
Differentiate between postfix and prefix operators in java.
Can we have multiple classes in single file ?
How we create object in copy constructor?
Why do we use threads in java?
Why should we create an object? what is a need of it? Apart from access members of a class i want what is a need of object what does it contain?? In normal class to access any member of thaht class we create object where as for static class we access its members using class name. what is a difference between them... thanks in advance.
What is the function of http?
Why are pointers not secure?
What is a buffer in computer?
I want to persist data of objects for later use. What is the best approach to do so?
What is an immutable class?
What is bufferedwriter?