
package c;
import java.math.*;
public class FuZi {
public static void main(String[] args) {
// create 2 BigDecimal Objects
BigDecimal bg1, bg2;
bg1 = new BigDecimal("123.126");
// set scale of bg1 to 6 in bg2
bg2 = bg1.setScale(4);
String str = "The value of " +bg1+ " after changing the scale to 6 is" +bg2;
// print bg2 value
System.out.println( str );
}
}


