DecimalFormat的妙用 & (转)DecimalFormat 数据格式化类的使用小结
摘要:
DecimalFormat df = new DecimalFormat("#.0");Basically, a 0 means "always show the digit in this position", where a # means "show the digit in this position unless it's zero".Then, you could get: String s = df.format(sum/3); // prints 100.0下面转一篇:DecimalFormat 数据格式化类的 阅读全文
posted @ 2013-02-04 16:21 在旅途 阅读(888) 评论(0) 推荐(0) 编辑