String.format("%,d",xxxx);String.format("%.2f",xxx);用到这两个函数,怎么合并到一起使用。
https://blog.csdn.net/anita9999/article/details/82346552 这个帖子有详细介绍能解决你目前的问题
double n = 1.0*100/3; System.out.println(String.format("%,.2f¥", n));