.
With Java 8+ you can use the method of Random to get an of random values then and to reduce the stream to a number of unique random values.
It does this by using a Random object.
The number we get represents the position in the list.