java保留2位小数

System.out.println(String.format("%.2f",money));

 

posted @ 2022-06-07 18:41  智人心  阅读(29)  评论(0)    收藏  举报