...
|
...
|
@@ -20,14 +20,14 @@ public class RandomUtil { |
|
|
public static String getCharAndNumr(int numLength,int charLength) {
|
|
|
String val = "";
|
|
|
Random random = new Random();
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
for (int i = 0; i < numLength; i++) {
|
|
|
// 输出字母还是数字
|
|
|
val += String.valueOf(random.nextInt(10));
|
|
|
}
|
|
|
for(int j=0;j<2;j++){
|
|
|
for(int j=0;j<charLength;j++){
|
|
|
int choice = random.nextInt(2) % 2 == 0 ? 65 : 97;
|
|
|
val += (char) (choice + random.nextInt(26));
|
|
|
}
|
|
|
return val;
|
|
|
return val.toLowerCase();
|
|
|
}
|
|
|
} |
...
|
...
|
|