Jump to content
Wikibooks The Free Textbook Project

Java Programming/Keywords/float

From Wikibooks, open books for an open world

float is a keyword which designates the 32 bit float primitive type.

The java.lang.Float class is the nominal wrapper class when you need to store a float value but an object reference is required.

Syntax:

float  <variable-name> = <float-value>;

For example:

Computer code
floatprice=49.95;


See also:

AltStyle によって変換されたページ (->オリジナル) /