赞
踩
1
2
3
4
5
6
DecimalFormat decimalFormat=new DecimalFormat("000");// 字符串数字的位数
DecimalFormat decimalFormat=
new
DecimalFormat(
"000"
);
// 字符串数字的位数
String code="aaa001"; // 字符串
String code=
"aaa001"
;
// 字符串
String codenew=code.substring(3, code.length()); // 截取字符中的数字
String codenew=code.substring(
, code.length());
// 截取字符中的数字
int i=Integer.parseInt(codenew)+1;
int
i=Integer.parseInt(codenew)+
String k=decimalFormat.format(i);
System.out.println(k);