Search Interview Questions | Click here and help us by providing the answer. Click Correct / Improve and please let us know. |
|
|||
|
| ||||
| Core Java - Interview Questions and Answers for 'Float' - 4 question(s) found - Order By Rating | ||||
| ||||
| Ans. Because the way float values are stored its not precise. For example - 0.1 is actually stored as 0.1000000000000000055511151231257827021181583404541015625 | ||||
| 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. | ||||
| Ans. http://www.buggybread.com/2015/01/java-data-types-float-classes-and.html | ||||
| ||||
| 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. | ||||