java 给数值添加千分位。

1 private static String nuber(double n) {
2         // TODO Auto-generated method stub
3         String str=DecimalFormat.getNumberInstance().format(n);//该方法精度只保留小数点后三位
4         return str;
5 }

猜你喜欢

转载自www.cnblogs.com/mengweihong/p/11305173.html