DecimalFormat数字格式化
程序员文章站
2022-07-05 09:10:53
...
java类,可能需要用到数字格式化
DecimalFormat df = new DecimalFormat("#0.00"); response.getWriter().write( "{\"bussinessName\":\""+ bussinessInfo.getBussinessName() + "\",\"bussinessAccount\":\"" + df.format(bussinessInfo.getBussinessMoney().getBussinessAccount()) + "\",\"bussinessCommission\":\"" + df.format(bussinessInfo.getBussinessMoney().getBussinessCommission()) + "\"}");
上一篇: java中Thread.sleep()
下一篇: java的Map循环