// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.math.BigDecimal;

public class Fixed {
    public static void main(String[] args) {
        BigDecimal d1 = new BigDecimal("12.3");
        System.out.println(d1 + " " + d1.scale());
        BigDecimal d2 = new BigDecimal("4.56");
        System.out.println(d2 + " " + d2.scale());
        BigDecimal d3 = d1.multiply(d2);
        System.out.println(d3 + " " + d3.scale());
    }
}
