数字格式化

        NumberFormat nf = NumberFormat.getNumberInstance();
        nf.setMaximumFractionDigits(2);
        nf.setRoundingMode(RoundingMode.HALF_UP);
        result.setProductionPlanTongBi(nf.format(productionPlanYOYABS));

你可能感兴趣的:(实战经验,java)