public BigDecimal(long, MathContext)
Translates a
long into a
BigDecimal, with rounding according to the context settings.
The scale of the BigDecimal, before any rounding, is zero.
Parameters
long val
: long value to be converted
to BigDecimal.
MathContext mc
: the context to use.
Throws
ArithmeticException
: if the result is inexact but
the rounding mode is UNNECESSARY.