//流水号组成部分为 0-9 A-Z,长度3位、数字到9下个数就是A,以此类推
public class test {
public static int initVal = 0;
public static void main(String[] args) {
for (int i = 0; i <= 46654; i++) {// 46654
System.out.println(addZeroForNum(Long.toString(getData(), 36).toUpperCase()));
}
}
public static int getData() {
return ++initVal;
}
public static String addZeroForNum(String str) {
int strLen = str.length();
StringBuffer sb = null;
while (strLen < 3) {
sb = new StringBuffer();
sb.append("0").append(str);// 左补0
str = sb.toString();
strLen = str.length();
}
return str;
}
}
4162

被折叠的 条评论
为什么被折叠?



