java.lang
Class Number
java.lang.Object
|
+--java.lang.Number
All Implemented Interfaces:
Serializable
Number is a generic superclass of all the numeric classes, including
the wrapper classes Byte, Short, Integer,
Long, Float, and Double. Also worth mentioning
are the classes in java.math.
It provides ways to convert numeric objects to any primitive.
Since:Authors:- Paul Fisher
- John Keiser
- Warren Levy
- Eric Blake <ebb9@email.byu.edu>
Number
public Number()
The basic constructor (often called implicitly).
byteValue
public byte byteValue()
Return the value of this Number
as a byte
.
Since:Returns:
doubleValue
public double doubleValue()
Return the value of this Number
as a float
.
Returns:
floatValue
public float floatValue()
Return the value of this Number
as a float
.
Returns:
intValue
public int intValue()
Return the value of this Number
as an int
.
Returns:
longValue
public long longValue()
Return the value of this Number
as a long
.
Returns:
shortValue
public short shortValue()
Return the value of this Number
as a short
.
Since:Returns: