java 给数值添加千分位。
程序员文章站
2022-06-30 08:54:13
1 private static String nuber(double n) { 2 // TODO Auto-generated method stub 3 String str=DecimalFormat.getNumberInstance().format(n);//该方法精度只保留小数点后... ......
1 private static string nuber(double n) { 2 // todo auto-generated method stub 3 string str=decimalformat.getnumberinstance().format(n);//该方法精度只保留小数点后三位 4 return str; 5 }
上一篇: 晒黄花菜到底应该怎么弄