float and double

There are two kinds of floating-point types: float and double.

float type represents single-precision numbers.

double type stores double-precision numbers.

Floating-Point Types width and ranges are shown here:

Java Floating-Point Types

NameWidth in BitsApproximate Range
double644.9e-324 to 1.8e+308
float321.4e-045 to 3.4e+038
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.