Following code is what I have done so far
Random randomeNum = new Random();
int n = randomeNum.nextInt();
System.out.println(Integer.toHexString(n));
Is this a correct way doing it?
您可以使用UUID生成32位随机十六进制数。
UUID id=randomUUID();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.