数字转金额格式* 999999.99 TO 999,999.99

/**
     * 数字转金额格式
     * 999999.99  TO  999,999.99
     * @param d
     * @return
     */
    public static String doubleToStr(double d){
       
        NumberFormat numberFormat1 = NumberFormat.getNumberInstance();
        numberFormat1.setMaximumFractionDigits(2);
        return numberFormat1.format(d);
    }
    
    public static void main(String[] args) {
         String temp = doubleToStr(726042222.62592313213);
            System.out.println(temp);
    }

 

posted @ 2014-12-24 10:27  也许还年轻  阅读(1156)  评论(0编辑  收藏  举报