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


Please Help Members By Posting Answers For Below Questions

explain multi-threading in java?

658


What is constructor and its types?

638


What are local variables?

687


What are kinds of processors?

655


What is array pointers ?

692






What is currentthread()?

654


What is implicit object in java?

635


What is jit and its use?

666


What exactly is a .class file?

676


what is inner class in java?

723


Why hashmap is used in java?

639


What are the methods available in a class?

701


What are the different conditional statements?

655


Why are the objects immutable in java?

638


What is the protected method modifier?

663