Will I get better random numbers quality if I will use such solution?
import java.util.*;
public class Main {
private static final Random PRNGs[] = new Random[137];
private static int nextInt() {
return PRNGs[ (int)(System.currentTimeMillis() % PRNGs.length) ].nextInt();
}
static {
for(int i=0; i<PRNGs.length; i++) {
PRNGs[i] = new Random();
}
}
public static void main(String[] args) {
System.out.println( nextInt() );
}
}
We know that in the real life it is possible to have 12 times red (or black) on the roulette. If one single instance of Random object is used such event as 12 times the same color is not achievable.