Most visited

Recently visited

Added in API level 1

Number

public abstract class Number
extends Object implements Serializable

java.lang.Object
    java.lang.Number
Known Direct Subclasses


抽象类 Number是类超 BigDecimalBigIntegerByteDoubleFloatIntegerLong ,并 Short

的子类 Number必须提供方法为代表的数值转换为 bytedoublefloatintlong ,并 short

也可以看看:

摘要(Summary)

Public constructors

Number()

公共方法(Public methods)

byte byteValue()

byte返回指定数字的值。

abstract double doubleValue()

double返回指定数字的值。

abstract float floatValue()

float返回指定数字的值。

abstract int intValue()

int返回指定数字的 int

abstract long longValue()

long返回指定数字的值。

short shortValue()

short返回指定数字的值。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

Number

Added in API level 1
Number ()

公共方法(Public methods)

byteValue

Added in API level 1
byte byteValue ()

byte返回指定数字的值。 这可能涉及四舍五入或截断。

返回(Returns)
byte the numeric value represented by this object after conversion to type byte.

doubleValue

Added in API level 1
double doubleValue ()

double返回指定数字的值。 这可能涉及四舍五入。

返回(Returns)
double the numeric value represented by this object after conversion to type double.

floatValue

Added in API level 1
float floatValue ()

float返回指定数字的值。 这可能涉及四舍五入。

返回(Returns)
float the numeric value represented by this object after conversion to type float.

intValue

Added in API level 1
int intValue ()

int返回指定数字的int 这可能涉及四舍五入或截断。

返回(Returns)
int the numeric value represented by this object after conversion to type int.

longValue

Added in API level 1
long longValue ()

long返回指定数字的值。 这可能涉及四舍五入或截断。

返回(Returns)
long the numeric value represented by this object after conversion to type long.

shortValue

Added in API level 1
short shortValue ()

short返回指定数字的值。 这可能涉及四舍五入或截断。

返回(Returns)
short the numeric value represented by this object after conversion to type short.

Hooray!