title: Random.nextInt(5) throws an IllegalArgumentException
body: <h2><strong><em>EDIT: SORRY!</em></strong></h2>
  
  <p>Turns out that I'm an idiot. The exception was being thrown from another call to r.nextInt() which was taking an uninitialized variable as an argument! Foot is very much in mouth.</p>
  
  <p>I'm really not sure what else to say about this:</p>
  
  <pre><code>Random r = new Random();
  
  class SomeClass {
     public SomeClass(){
         new SomeClass(r.nextInt(5));
     }
  
     public SomeClass(int i){
     ...
  </code></pre>
  
  <p>Throws a <code>NullPointerException</code> where r.nextInt(5) is called. Any ideas?</p>