There are two main differences in float and double. Those are size and precision.
Float – 7 digits of precision(32 bit) and 4 bytes
Ex:- 0.1234567
Double- 15 digits of precision (64 bit) and 8 bytes
Ex:- 0.123456789123456
You can store float value in a double variable like this
double numb;
float numb2 = 22.5F;
numb = numb2;
output -> 22.5
2
solved difference between float and double data type