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