Core Java - Interview Questions and Answers for 'Float' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Core Java - Interview Questions and Answers for 'Float' - 4 question(s) found - Order By Newest

 Q1. What is the difference between float and double?
Ans. Float can represent up to 7 digits accurately after decimal point, where as double can represent up to 15 digits accurately after decimal point.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types   float   double   difference between   basic interview question


 Q2. Name few float data type related classes and interfaces ?
Ans. http://www.buggybread.com/2015/01/java-data-types-float-classes-and.html

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types   float


 Q3. Which takes more memory - float or Float ?Core Java
Ans. float is a native data type whereas Float is a class. A Float object will always take more memory than float variable as there are metadata overheads with the objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data type   float     Asked in 3 Companies      basic        frequent


 Q4. Why calculations in float or Double sometimes gives unpredictable results ?Core Java
Ans. Because the way float values are stored its not precise.

For example - 0.1 is actually stored as
0.1000000000000000055511151231257827021181583404541015625

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     double  float  data type      basic        frequent



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: