import java.text.*;
class Example5_16 {
    public static void main(String[] args) {
        double r = 5;
        double area = Math.PI * r * r;
        System.out.println("面积是" + area);
        NumberFormat number = NumberFormat.getInstance();
        number.setMaximumFractionDigits(3);
        number.setMinimumIntegerDigits(2);
        System.out.println("格式化后的数据是" + number.format(area));
    }
}
