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. |
|
| ||||
Core Java - Interview Questions and Answers for 'Float' - 4 question(s) found - Order By Newest | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
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 | ||||