×

Loading...

Topic

This topic has been archived. It cannot be replied.
  • 工作学习 / IT技术讨论 / 请问: Java 里的 Double 类型如何format 成小数点后两位?? 即 36.13323244423 -> 36.13 . 谢谢!
    • (double)Math.round(36.1332324423*100)/100;
    • Look at java.text.* package and you will get the solution.
      I cannot remember the details. Try NumberFormat ... maybe my response is too late.