Class java.lang.Number
All Packages    This Package    Previous    Next

Class java.lang.Number

java.lang.Object
   |
   +----java.lang.Number

public class Number
extends Object
Number is an abstract superclass for numeric scalar types. Integer, Long, Float and Double are subclasses of Number that bind to a particular representation.

See Also:
Integer, Long, Float, Double
Version:
1.11, 11 Feb 1995
Author:
Lee Boynton, Arthur van Hoff

Number()

doubleValue()
Returns the value of the number as a double.
floatValue()
Returns the value of the number as a float.
intValue()
Returns the value of the number as an int.
longValue()
Returns the value of the number as an long.

Number
  public Number()

intValue
  public abstract int intValue()
Returns the value of the number as an int. This may involve rounding if the number is not already an integer.
Returns:
the integer value

longValue

  public abstract long longValue()
Returns the value of the number as an long.

floatValue

  public abstract float floatValue()
Returns the value of the number as a float.

doubleValue

  public abstract double doubleValue()
Returns the value of the number as a double.


All Packages    This Package    Previous    Next