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