float keyword

Description
The float numeric type represents a single-precision 32-bit IEEE 754 floating-point number. The default value of a float instance variable, class variable, and array component is zero, that is, 0.0.  The values of float are from 1.4e-45 to 3.4028235e38.

A floating-point literal is assumed to be of type double and it can optionally be suffixed with an ASCII letter D or d.  A floating point literal is of type float if it is suffixed with an ASCII letter F or f.

Example

float exampleFloat = 5.f; // name of the variable is exampleFloat and its value is 5.f

Here are some other examples of floating-point literals:

1e1f 
2.f
.3f
0f
3.14f
6.022137e+23f

ngrelr.gif (548 bytes)
Java types
double keyword

Source: The Java Language Specification. Copyright (C) 1996 Sun Microsystems, Inc.