How to select random values from a given range

前端 未结 6 616
一整个雨季
一整个雨季 2021-01-06 10:44

I\'m trying to create an android application which will generate random series of values (integer numbers in this case) in a given range (but NOT equal betw

6条回答
  •  逝去的感伤
    2021-01-06 11:28

    If I understand this correctly, you all the numbers should be unique. You could fill a list with the range you want to draw from. Every time you have selected a value from it, you should remove it from the list so it won't be selected a second time. I hope this description is clear enough. If not, I will provide some code.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题