我需要生成可以除以2的随机数:2 4 6 8 10 12 14 16 18 .....
我的代码看起来像:
Random random = new Random(); int i = random.nextInt(20);
希望你知道我想要什么,你可以帮助我.
java random numbers
java ×1
numbers ×1
random ×1