模拟一个验证码
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 6; i++) {
sb.append(random.nextInt(10));//0到9
}
System.out.println(sb.toString());
模拟一个验证码
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 6; i++) {
sb.append(random.nextInt(10));//0到9
}
System.out.println(sb.toString());