List of usage examples for java.math BigDecimal BigDecimal
public BigDecimal(BigInteger unscaledVal, int scale, MathContext mc)
From source file:Main.java
public static void main(String[] args) { char[] ch = new char[] { '1', '2', '3', '4', '5', '6', '7' }; BigDecimal bg1 = new BigDecimal(ch, 2, 3); System.out.println(bg1);/*from w ww . j a v a2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { MathContext mc = new MathContext(3); BigDecimal bg1 = new BigDecimal(new BigInteger("40"), 2, mc); }