
Basic Utility Classes • 625
19.12.1 The Number Class
The abstract Number class is the superclass of classes Byte, Double, Float, Integer, Long and
Short. Subclasses of Number class must provide methods to convert the represented numeric value to
byte, double, float, int, long and short . For that the class has six methods which the subclasses
must defi ne. They are given below.
Method Signature Description
byte byteValue()
Returns the value of the specifi ed number as a byte.
short shortValue()
Returns the value of the specifi ed number as a short.
int intValue()
Returns the value of the specifi ed number as a int.
float floatValue()
Returns ...