Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



what is the output ? Math.floor(-2.1) a)2 b)-2 c)-3.0 d)0..

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 the output ? Math.floor(-2.1) a)2 b)-2 c)-3.0 d)0..

Answer / sasirekha

answer is -3.0

Is This Answer Correct ?    18 Yes 2 No

what is the output ? Math.floor(-2.1) a)2 b)-2 c)-3.0 d)0..

Answer / blessy carolina

-3.0

Is This Answer Correct ?    5 Yes 0 No

what is the output ? Math.floor(-2.1) a)2 b)-2 c)-3.0 d)0..

Answer / evelin

-2 is the nearest smallest integer to -2.1

Is This Answer Correct ?    2 Yes 15 No

Post New Answer

More Core Java Interview Questions

What is the driver class?

0 Answers  


How many bits is a boolean?

0 Answers  


Can we call the constructor of a class more than once for an object?

0 Answers  


Can we start a thread twice in java?

0 Answers  


What is the maximum size of list in java?

0 Answers  


Which is dependent variable?

0 Answers  


What is ResourceBundle class?

1 Answers  


What is difference between equals and hashcode method?

0 Answers  


difference between jsp and java script?

3 Answers  


What is a modifier?

1 Answers  


What is a boolean field?

0 Answers  


Can we restart a dead thread in java?

0 Answers  


Categories