title: What is seed in util.Random?
body: <p>I can't understand what was the meaning of <a href="http://en.wikipedia.org/wiki/Seed" rel="nofollow noreferrer">Seed</a> in <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Random.html" rel="nofollow noreferrer">java.util.Random</a> ? I had read <a href="https://stackoverflow.com/questions/15182496/why-does-this-code-print-hello-world">Why does this code print “hello world”?</a> question and I am still confuse about <strong>seed</strong> . Can anyone describe me kindfully what was <strong>seed</strong> actually mean ? Thanks.</p>
  
  <p>In documentation for <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#setSeed%28long%29" rel="nofollow noreferrer">setSeed()</a> method ... what does mean <code>seed - the initial seed</code> ?</p>
  
  <blockquote>
    <p>public void <strong>setSeed</strong>(long seed) <br>
    Sets the seed of this random number generator using a single long seed. The general contract of setSeed is that it alters the state of this random number generator object so as to be in exactly the same state as if it had just been created with the argument seed as a seed. The method setSeed is implemented by class Random by atomically updating the seed to<br>
    <em>(seed ^ 0x5DEECE66DL) &amp; ((1L &lt;&lt; 48) - 1)</em><br>
    and clearing the haveNextNextGaussian flag used by nextGaussian().<br>
    The implementation of setSeed by class Random happens to use only 48 bits of the given seed. In general, however, an overriding method may use all 64 bits of the long argument as a seed value.
    <strong>Parameters</strong>:<br>
    seed - the initial seed</p>
  </blockquote>
  
  <p>I would expect if I can understand exactly meaning of <code>seed</code> , I am sure I will understand clearly to <a href="https://stackoverflow.com/questions/15182496/why-does-this-code-print-hello-world#15182511">this</a> answer. </p>