How Java random generator works? : <p>I wrote program that simulates dice roll</p>

<pre><code>    Random r = new Random();
    int result = r.nextInt(6);
    System.out.println(result);
</code></pre>

<p>I want to know if there is a way to "predict" next generated number and how JVM determines what number to generate next?</p>

<p>Will my code output numbers close to real random at any JVM and OS?</p>
