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