BigDecimal.toBigIntegerExact

Converts this {@code BigDecimal} to a {@code BigInteger}, checking for lost information. An exception is thrown if this {@code BigDecimal} has a nonzero fractional part.

@return this {@code BigDecimal} converted to a {@code BigInteger}. @throws ArithmeticException if {@code this} has a nonzero fractional part.

class BigDecimal
toBigIntegerExact
()

Meta