Number.longValue()

Signature

long longValue (String s, int radix)

Domain

action, condition

Description

Returns an long holding the value extracted from the specified String when parsed with the radix given by the second argument. The first argument is interpreted as representing a signed long in the radix specified by the second argument. The result is a long object that represents the long value specified by the string.

Parameters

NameTypeDescription
sStringA String containing a long (in the radix specified) to be converted to an long.
radixintThe radix to use when converting the integer in the String s to an long.

Returns

TypeDescription
longThe value of the long in the String passed based on the passed radix (number base).

Cautions

none

Example


long result = Number.longValue ("21012", 3);

Result is: result contains: 194L