BigDecimal(BigInteger val) constructor from BigDecimal has the following syntax.
public BigDecimal(BigInteger val)
In the following code shows how to use BigDecimal.BigDecimal(BigInteger val) constructor.
import java.math.BigDecimal; import java.math.BigInteger; // w ww . j a va 2s. c o m public class Main { public static void main(String[] args) { BigDecimal bg1 = new BigDecimal(new BigInteger("40")); } }