title: Random numbers within a range excluding zero
body: <p>I'm trying to create a Random number generator using, <code>java.util.Random</code>. I need to generate numbers between -5 and +5 excluding zero. This is for bouncingbox app for one of my labs. The random number is the direction of the velocity of the box.</p>
  
  <pre><code>Random v = new Random();
         int deltaX = -5 + v.nextInt(10)  ;
         for(; deltaX&gt;0 &amp;&amp; deltaX&lt;0;){
  
             System.out.println(deltaX);
         }
  </code></pre>
  
  <p>I've tried this, but it doesn't exclude zero. Any help would be appreciated.</p>