DecimalFormat fmt = new DecimalFormat("##,###,###,###,##0"); 

     String outStr = fmt.format(Double.parseDouble("1234"));

 

如此outStr 就會帶出1,234 

如果是1234567就會帶出1,234,567  

arrow
arrow
    全站熱搜

    ROACH 發表在 痞客邦 留言(0) 人氣()