@Test
public void test1(){
int a = 1;
String code = String.format("%04d",a);//变成0001,如果想变成001---“%03d”
System.out.println(code);
}
java 1怎么变成0001
最新推荐文章于 2023-07-25 16:27:24 发布
@Test
public void test1(){
int a = 1;
String code = String.format("%04d",a);//变成0001,如果想变成001---“%03d”
System.out.println(code);
}