Code example for DecimalFormat

Methods: setGroupingSizeformat

0
        str = "MB";
        size /= 1024;
      } 
    } 
 
    DecimalFormat formatter = new DecimalFormat();
    /* �C3�ӼƦr��,���j�p�G1,000 */ 
    formatter.setGroupingSize(3);
    String result[] = new String[2];
    result[0] = formatter.format(size);
    result[1] = str;
 
    return result;
  } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE