`
nlslzf
  • 浏览: 1027339 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

java保留小数

    博客分类:
  • java
阅读更多
http://www.bincn.com/index.php?load=read&id=607
首先定义:
  java.text.DecimalFormat   df=new   java.text.DecimalFormat("#0.00");

再是:
x = 83.3333333333;
df.format(x);

结果: 83.33
分享到:
评论
1 楼 cuixuxucui 2008-08-29  
应该再补一个AS用的

相关推荐

Global site tag (gtag.js) - Google Analytics