- 2
difference between float and double...
5 Answers
+ 2
Precision is the mainĀ differenceĀ whereĀ floatĀ is a single precision (32 bit)Ā floatingĀ point datatype,Ā doubleĀ is aĀ doubleĀ precision (64 bit)Ā floating point data type and decimal is a 128-bitĀ floatingĀ point data type.
+ 1
float takes less space and double takes more space
+ 1
float accepts decimals upto 10 lac while double accepts above 10 lac.
0
float only accepts few digits after a decimal point....But double displays more number after the decimal point :)
0
float is 4 bytes and double is 8 bytes in Java ..! So, float is used to store smaller number with precision compared to double