java日常-将1变成001

//定义long型count为1
Long count1 =1;
//实例化format,格式为“000”
Format f1=new DecimalFormat("000");
//将1变为001
String  count =f1.format(count1);
发布了262 篇原创文章 · 获赞 201 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/hdy14/article/details/103287204