摘要: 方法一:String的format方法(推荐) double f = 111231.5585; System.out.println(String.format("%.2f", f)); 方法二:DecimalFormat的format方法 double f = 111231.5585; Decim 阅读全文
posted @ 2020-10-17 20:47 Tomorrow1126 阅读(1837) 评论(0) 推荐(0) 编辑