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 |
How will you serialize a singleton class without violating singleton pattern?
What are the types of classes in java?
what is meant by string pooling?
12 Answers Oracle, Polaris, Tribal Fusion, Wipro,
Can a main method be declared final?
What advantage do java's layout managers provide over traditional windowing systems?
Is string a data type in java?
how its run?
Is ++ operator is thread safe in java?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
Why multiple inheritance is not supported by java?
What is vector capacity in java?
How do you sort arraylist in descending order?