Java: Convert from BigInteger to BigDecimal

Use the BigDecimal(BigInteger val) constructor:

BigInteger bigInt = ...
BigDecimal bigDec = new BigDecimal(bigInt);

See Also

Converting the other way around: Convert from BigDecimal to BigInteger

Comments

Be the first to comment!