📜  生成一个范围内随机数的数组java代码示例

📅  最后修改于: 2022-03-11 14:52:44.483000             🧑  作者: Mango

代码示例1
import java.util.concurrent.ThreadLocalRandom;

// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1);