📜  指定小数位 java 代码示例

📅  最后修改于: 2022-03-11 14:52:37.513000             🧑  作者: Mango

代码示例3
total = (double) 100 / listMember.size();
DecimalFormat df = new DecimalFormat("#.##");
String dx = df.format(total);
total = Double.valueOf(dx);