title: Randomly generate odd numbers in the range
body: <p>I'm trying to generate odd numbers randomly. I tried this, but it generates even numbers also:</p>
  
  <pre><code>int coun=random.nextInt();
  for(int i=1; i&lt;100; i++){
      if(i%2==1){
        coun=random.nextInt(i);
      }
  }
  </code></pre>
  
  <p>How can I generate odd numbers randomly? </p>