Number.valueOfLong()

Signature

int valueOfLong (long l)

Domain

action, condition

Description

Returns the value of the long passed in (l) as an int. The high order bits are simply truncated which can result in sign reversal.

Parameters

NameTypeDescription
llongA long that will be returned as an int.

Returns

TypeDescription
intThe value of the long passed in (l) as an int.

Cautions

The high order bits are simply truncated which can result in sign reversal.

See Also

java.lang.Long

Example


Number result = Number.valueOfLong (345L);

Result is: result contains: 345