java里面怎么format number?
所在版块:社会百科 发贴时间:2003-01-21 00:02

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
double i,j;

要把i/j的结果format成含有2位小数的格式, 例如 3.03, 4.00, 120.32 之类的格式.

请问怎么做?

Thanks~
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Many events have slipped by.
And you are here, now, always.

People are not memories that you can put into words. They live.

 相关帖子 我要回复↙ ↗回到正文
java里面怎么format number? 辰星   (110 bytes , 647reads )
Quite lots of ways..^^^ maserati   (321 bytes , 360reads )
[SUGGESTION]THIS IS WRONG! 不告诉你   (61 bytes , 218reads )
如果你是说CS1102 lab 0的话 Climbing   (743 bytes , 292reads )
hey!!! 你怎么干这种事? 采心   (55 bytes , 245reads )
lab 0 lah Climbing   (8 bytes , 190reads )
.......是不应该给答案,但也不应该这样地骂。。。 coolapple   (0 bytes , 173reads )
:$ 采心   (85 bytes , 206reads )
haha... 不告诉你   (0 bytes , 186reads )
here SmellsLikeTeenSpirit   (177 bytes , 204reads )