I was trying to explain the random number generator in Java to a friend when he kept getting the same numbers every time he ran the program. I created my own simpler version
Hope this helps..
Random r = new Random(System.currentTimeMillis()); double[] rand = new double[500]; for(int i=0;i<100;i++){ rand[i] = r.nextDouble(); //System.out.print(rand[i] + "\n"); } //System.out.println(); return rand[randomInt];