随机数:
ThreadLocalRandom equivalent of class java.util.Random for multithreaded environment. Generating a random number is carried out locally in each of the threads. So we have a better performance by reducing the conflicts.
- ThreadLocalRandom.current().nextInt(x,y);
复制代码
|