Java - random number
2019-10-03 本文已影响0人
Leahlijuan
int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1);
Min + (int)(Math.random() * ((Max - Min) + 1))
int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1);
Min + (int)(Math.random() * ((Max - Min) + 1))