Java中的格式化数值(eg:保留两位小数)
CommonVO cvo = (CommonVO) request.getAttribute("cancelList.vo"); DecimalFormat myformat1 = new DecimalFormat("0.00"); //DecimalFormat("0.##");
String strFee = myformat1.format(cvo.getDouble("fee"));out.println(strFee);

浙公网安备 33010602011771号