Top
Previous Next
The Java Language CS 161 - Java

Primitive Floating Point Number Types

Memory

Type
float            
double                        

Details

TypeSize
float32 bits
double64 bits

Example

float fval = 1.0f;
double dval = 1.0;
double pi = 3.14;
double betterPi = Math.PI;  // from java.lang.Math

Top
Previous Next
jwd