67,515
社区成员
发帖
与我相关
我的任务
分享
RandomStringUtils su = new RandomStringUtils();
//生成10个大写字母和数字混合的16位随机码
for (int i = 0; i < 20; i++) {
System.out.println(su.random(16, "ABCDEFGHIJKLMNOPQRSTUVWSYZ0123456789"));
}
if (random.nextBoolean()) {
随机取字母
} else {
随机取数字
}