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 a void method?

0 Answers  


Write the code for Palindrome ?

2 Answers   Bally Technologies,


Can you extend more than one interface?

9 Answers  


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

4 Answers   Accenture,


why java does not support multiple inheritance

41 Answers   Diamond, Euclid, Evergent, KLKJ, Mind Tree, NIIT, SSI Small Scale Industries, Wipro,


What is main function purpose?

0 Answers  


What is the specification of ?CODEBASE? in an applet?

1 Answers  


How to use string tokenizer class.

0 Answers  


Define jit compiler?

0 Answers  


What is the minimum and maximum length of an identifier?

6 Answers   TCS,


What is means by DLL file means ? What is the use of DLL file? What are the contents of DLL file?

4 Answers  


What does it mean to flush a file?

0 Answers  


Categories