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

What is default constructors?

535


what is the difference between yielding and sleeping? : Java thread

516


What is the epoch date?

564


Who developed java?

560


What does a za z0 9 mean?

558






What is the use of list in java?

512


How many arguments can be passed to main ()?

518


List some important characteristics on jre

582


What does substring mean?

501


What is ‘has a’’ relationship in java?

720


How can we find the actual size of an object on the heap?

798


Is java a prime method?

543


Is string a data type in java?

587


How do I enable java in safari?

540


What’s the difference between unit, integration and functional testing?

608