小编ray*_*ray的帖子

选择具有特定范围的唯一随机数

我的问题是我希望我的程序在0到3之间的数字范围内做出四个独特的随机选择我试着在随机类中做但我不能,如果你可以通过代码帮助它会很棒,我的程序将是这样的事情可以说清楚

my range

0 1 2 3  randomly chosen number 3

0 1 2    randomly chosen number 1

0 2      randomly chosen number 2

0        it will choose 0 and then the program closes
Run Code Online (Sandbox Code Playgroud)

java random probability

0
推荐指数
1
解决办法
2960
查看次数

标签 统计

java ×1

probability ×1

random ×1