发布于
2022-8-22
摘要:
用DecimalFormat类的实例化对象的format的方法,在DecimalFormat构造的时候将所需要的格式传进去; 具体代码为: 也可以for 循环定义 format 的数量 但是如果输出0.222222的小数点后2位,便会输出.22,这时候将 # 改为 0 即可,#可以理解为消除小数点前 阅读全文
You got to put the past behind you before you can move on.