title: how to generate random number between 0 and 2^32-1 in java
body: <p>how to generate random number <code>between 0 and 2^32-1</code> in java?
  I write link this:</p>
  
  <pre><code>long[]num = new long[size + 1];
  Random random = new Random();
  for (int i = 1; i &lt; size + 1; i++) {
  num[i] = (long)random.nextInt()+(long)(1&lt;&lt;31);
  System.out.println(num[i]);
  }
  </code></pre>
  
  <p>but it print</p>
  
  <pre><code>-1161730240
  -1387884711
  -3808952878
  -3048911995
  -2135413666
  </code></pre>
  
  <p>i don't know why..</p>