保留两位小数,四舍五入

new java.text.DecimalFormat("#.00").format(0.1465) 

new java.text.DecimalFormat("0.00").format(0.1465) 

.15

0.15 

猜你喜欢

转载自niewj.iteye.com/blog/2219919