The Float class wraps a primitive float type value in an object. Its object contains only a single field whose type is float.
Methods |
Description |
byteValue() |
Returns the value of this float as a byte |
compare() |
Compares the two specified float values |
compareTo() |
Compares two float objects numerically |
doubleValue() |
Returns a double value for this Float object |
equals() |
Compares the object against the specified object |
floatToIntBits() |
Returns a representation of floating-point value according to IEEE floating-point "single format " bit layout |
floatToRawIntBits() |
Returns a representation of floating-point value according to IEEE floating-point "single format" bit layout preserving NaN values. |
floatValue() |
Returns the float value of this Float object |
hashCode() |
Returns a hash code for this Float object |
intBitsToFloat() |
Returns the float value for the given bit representation |
intValue() |
Returns an int value for this Float object |
isFinite() |
Returns a Boolean value 'true', if the argument is a finite floating-point value |
isInfinite() |
Returns a Boolean value 'true', if this float value or the specified number is infinitely large in magnitude |
isNan() |
Returns a Boolean value 'true', if the specified number is NaN(Not a Nan) value. |
longValue() |
Returns a long value for this float object |
max() |
Returns the greatest of two float values and gives the same result as by calling Math.max |
min() |
Returns the smallest of two float values |
parseFloat() |
Returns a new float initialized to the value of the specified String |
shortValue() |
Returns a short value for this Float object |
sum() |
Adds the two float values together |
toHexString() |
Returns a hexadecimal string representation of the float argument. |
toString() |
Returns a string representation of the Float object |
valueOf() |
Returns a Float instance representing the specified float or string value. |