哪位高手帮我看一下这个JAVA题目 DecimalFormat df=new DecimalFormat 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 package test;import java.text.*;import java.math.*;public class NumberToString { public NumberToString() { } public static void main(String[] args) { System.out.println(floatToString(1230991.291)); System.out.println(floatToString(200.0)); System.out.println(floatToString(87238.001)); System.out.println(floatToString(-23870.0)); } public static String floatToString(double value) { DecimalFormat df=new DecimalFormat(",###.###"); return df.format(value); }} 模仿sql查询,设计。 JDK1.7部分新特性用不了咋回事? 遇到一个吐血小问题!!!(之二) 求助WebLogic10.3与hibernate3.0冲突解决方法 无限级目录树生成xml的迭代算法 INCLUDE 这两个都不能放DOC文件 Form表单大批文本框中的值怎么写到数据库表里面? weblogic中怎么找到ejb工程的jar包或是怎么在eclipse中把ejb打包,在客户端工程引用? 存储图片问题 总结2003,展望2004! Tomcat配置链接池,几个标签不太清楚的地方?请高手指教!!! 在线等~JB中如何import oracle.jdbc.driver包
import java.math.*;
public class NumberToString {
public NumberToString() {
}
public static void main(String[] args) {
System.out.println(floatToString(1230991.291));
System.out.println(floatToString(200.0));
System.out.println(floatToString(87238.001));
System.out.println(floatToString(-23870.0)); }
public static String floatToString(double value) {
DecimalFormat df=new DecimalFormat(",###.###");
return df.format(value);
}
}