小数点后两位的截取

 Formatter 为java.util.Formatter包中的:

new Formatter().format("%.2f", 20.0000 ).toString()   // 结果为20.00

猜你喜欢

转载自blog.csdn.net/qq_37469931/article/details/80757256