一个数字位数不够时前面补0

//import java.text.DecimalFormat Integer num1 = 1; Integer num2 = 1002; DecimalFormat df=new DecimalFormat("000"); String str1 = df.format(num1); //001 String str2 = df.format(num2); //1002 上述代码中,数
相关文章
相关标签/搜索