DecimalFormat数字格式化

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)