Float

public final class Float extends Number
implements Comparable<Float>

The Float class wraps a value of primitive type float in an object. An object of type Float contains a single field whose type is float.

In addition, this class provides several methods for converting a float to a String and a String to a float, as well as other constants and methods useful when dealing with a float.

Constant Summary

int BYTES The number of bytes used to represent a float value.
int MAX_EXPONENT Maximum exponent a finite float variable may have.
float MAX_VALUE A constant holding the largest positive finite value of type float, (2-2-23)·2127.
int MIN_EXPONENT Minimum exponent a normalized float variable may have.
float MIN_NORMAL A constant holding the smallest positive normal value of type float, 2-126.
float MIN_VALUE A constant holding the smallest positive nonzero value of type float, 2-149.
float NEGATIVE_INFINITY A constant holding the negative infinity of type float.
float NaN A constant holding a Not-a-Number (NaN) value of type float.
float POSITIVE_INFINITY A constant holding the positive infinity of type float.
int SIZE The number of bits used to represent a float value.

Field Summary

public static final Class<Float> TYPE The Class instance representing the primitive type float.

Public Constructor Summary

Float(float value)
Constructs a newly allocated Float object that represents the primitive float argument.
Float(double value)
Constructs a newly allocated Float object that represents the argument converted to type float.