Here is my problem: I have an array of integers, I would recover 20% of the array elements in a random manner. Is there a function in java to have more than a random value?
I tested for only one value:
Random rand=new Random();
int min=0, max=10;
int valeur = rand.nextInt(max - min + 1) + min;
This will prevent numbers being used twice and will get 20%: