Home »
MCQs »
Scala MCQs
Why is Double better than Float values?
13. Why is Double better than Float values?
- It can store double-precision values providing more accurate data to be stored.
- It stores 64 bits values instead of 32 bits from a float.
- Float Values are better
- Both A and B
Answer: D) Both A and B
Explanation:
The Double type is more precise than Float type and can store 64 bits, double of the number of bits float can store. Double is more precise and for storing large numbers, we prefer double over float.