Java小数点保留两位

//使用0.00不足位补0,#.##仅保留有效位
new DecimalFormat("0.00").format(num);

猜你喜欢

转载自blog.csdn.net/qq_35841348/article/details/80734982