We can use org.apache.commons.lang3.RandomUtils to generate random numbers using a single line. int x = RandomUtils.nextInt(1, 1000);.
確定! 回上一頁