java lang Number








Class java.lang.Number





All Packages Class Hierarchy This Package Previous Next Index


Class java.lang.Number


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



public abstract class Number
extends Object
implements Serializable

The abstract class Number is the superclass of
classes Byte, Double, Float,
Integer, Long, and Short.

Subclasses of Number must provide methods to convert
the represented numeric value to byte, double,
float, int, long, and
short.


See Also:
Byte, Double, Float, Integer, Long, Short








Number()







byteValue()
Returns the value of the specified number as a byte.

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

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

intValue()
Returns the value of the specified number as an int.

longValue()
Returns the value of the specified number as a long.

shortValue()
Returns the value of the specified number as a short.







Number

public Number()






intValue

public abstract int intValue()


Returns the value of the specified number as an int.
This may involve rounding.


Returns:
the numeric value represented by this object after conversion
to type int.



longValue

public abstract long longValue()


Returns the value of the specified number as a long.
This may involve rounding.


Returns:
the numeric value represented by this object after conversion
to type long.



floatValue

public abstract float floatValue()


Returns the value of the specified number as a float.
This may involve rounding.


Returns:
the numeric value represented by this object after conversion
to type float.



doubleValue

public abstract double doubleValue()


Returns the value of the specified number as a double.
This may involve rounding.


Returns:
the numeric value represented by this object after conversion
to type double.



byteValue

public byte byteValue()


Returns the value of the specified number as a byte.
This may involve rounding or truncation.


Returns:
the numeric value represented by this object after conversion
to type byte.



shortValue

public short shortValue()


Returns the value of the specified number as a short.
This may involve rounding or truncation.


Returns:
the numeric value represented by this object after conversion
to type short.




All Packages Class Hierarchy This Package Previous Next Index

Submit a bug or feature - Version 1.1.7 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.




Wyszukiwarka

Podobne podstrony:
java lang NumberFormatException
java lang ClassCastException
java lang Integer
java lang Throwable
java lang Float
java lang ClassCircularityError
java lang Long
java lang SecurityException
java lang ArrayIndexOutOfBoundsException
java lang Byte
Package java lang
java lang Runtime
java lang InternalError
java lang Exception
java lang reflect Member
java lang Compiler
java lang IllegalThreadStateException
java lang NegativeArraySizeException
java lang UnknownError

więcej podobnych podstron