public StringBuilder random14(int length) {
StringBuilder uid = new StringBuilder();
Random rd = new SecureRandom();
for (int i = 0; i < length; i++) {
uid.append(rd.nextInt(10));
}
return uid;
}
笔记:生成任意位数的随机数
最新推荐文章于 2022-01-17 17:15:33 发布