BigInteger.longValue

Converts this BigInteger to a {@code long}. This conversion is analogous to a <i>narrowing primitive conversion</i> from {@code long} to {@code int} as defined in <cite>The Java&trade; Language Specification</cite>: if this BigInteger is too big to fit in a {@code long}, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInteger value as well as return a result with the opposite sign.

@return this BigInteger converted to a {@code long}. @see #longValueExact() @jls 5.1.3 Narrowing Primitive Conversion

class BigInteger
long
longValue
()

Meta