The Java floating point types are float and double. Floating point types are numbers with a decimal place.
Occupies 32 bits or 4 bytes, with 6 or 7 significant digits
Default value of 0.0
Range: 6-7 significant decimal digits
You specify the float by placing an F literal after the float value. If you don't, the compiler will treat your number as a double.
Java floating point numbers follow the IEE754 specification, which includes positive and negative signed numbers, positive and negative zero, and a special value referred to as NaN (Not a Number).
NaN is used to represent the result of an illegal or invalid operation, such as an attempt to divide by zero. The Float and Double wrapper classes both have a method ...