Java BigInteger to BigDecimal

In this post, we will see how to convert BigInteger toBigDecimal in java.

Using BigDecimal constructor

You can simply use BigDecimal’s following constructor to convert BigInteger to BigDecimal.

BigDecimal(BigInteger val)

Here is the complete example to convert BigInteger to BigDecimal in java.

When you run above program, you will get below output:

BigDecimal bd: 10

That’s all about how to convert BigInteger to BigDecimal in java.

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *