问个JAVA的简单问题,
怎么把double类型转换成String类型 比如格式:1.34E2 转换成字符串:134

解决方案 »

  1.   

    先将double转成bigdecimale,在转
      

  2.   

    你看看这个吧,我从没用过,也不知道具体怎么做.
    java.text.DecimalFormat
      

  3.   

    比较常用的是:java.math.BigDecimal类来处理;如果象楼主这样转换一下用:java.text.DecimalFormat类,
    new DecimalFormat("0.00"),然后format一下!
      

  4.   

    String format="####.##"; //(保留两位小数)
    String retString=NumberFormat.getIntegerInstance().format(1.3825180899E10,format);
      

  5.   

    如果你要精确的数据请使用,BigDecimal类型方法,楼上有人介绍了