jeudi 7 septembre 2017

Make a set of random Integers Scala

Is there a way in Scala to have a set of Ints be random without duplicates?

For example, I have set of Ints currently set to zero by default; a,b,c,d,e. And I want to assign a random int to each one from 1-100 while never assigning the same number to any of the variables. Thanks.




Aucun commentaire:

Enregistrer un commentaire