dimanche 17 octobre 2021

Java 8: Random selection of List using Random.LongStream() [closed]

Is there a way to get a random selection of items (no repeats) from a stream if you give it a Random.IntStream()?

So I would have an ArrayList of 1000 elements and I want a random selection of 10 of those 1000.

Thank you




Aucun commentaire:

Enregistrer un commentaire