java
文章平均质量分 53
cher2012
这个作者很懒,什么都没留下…
展开
-
float型,小数部分为0,则不显示小数部分
import java.text.DecimalFormat;public class Test{ public static void main( String[] args ){ DecimalFormat df = new DecimalFormat( "#0.##### " ); fl...原创 2011-01-15 18:45:53 · 2267 阅读 · 0 评论 -
Customizing Formats
Customizing Formats You can use the DecimalFormat class to format decimalnumbers into locale-specific strings. This class allows you to controlthe display of leading and tra...原创 2011-05-25 14:41:49 · 109 阅读 · 0 评论