Floating-Point Numbers and Type double

Floating-point number

float represents single-precision floating-point numbers up to seven significant digits.

double represents double-precision floating-point numbers that require twice as much memory as float and provide 15 significant digits—approximately double the precision of float variables.

Java treats all floating-point literals (such as 7.33 and 0.0975) as double values by default.

Appendix D, Primitive Types shows the ranges of values for floats and doubles