数字格式化

int res = 1; 
DecimalFormat df = new DecimalFormat("0000");
String statistics = df.format(res);

  

原文地址:https://www.cnblogs.com/zhoucx66/p/7120784.html