package vismon;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Formatter;

/**
 * Created by IntelliJ IDEA.
 * User: maryam
 * Date: 11-05-26
 * Time: 1:19 AM
 * To change this template use File | Settings | File Templates.
 */
public class Test1 {
    public static void main(String[] args) {
        Formatter f = new Formatter();
        double d = 0.712;
        System.out.println(f.format("%.3f", d).toString());

        BigDecimal bd = new BigDecimal(d).setScale(1, 3);
        System.out.println(bd);


    }


}
