title: Store odd numbers in array with for loop
body: <p>I'm trying to create an <code>array</code> named <code>odds</code> that stores all odd numbers between <code>-6</code> and <code>38</code> into it using a <code>for</code> loop.</p>
  
  <pre><code>int[] odds = new int[22];
  
  for (int i = -6, m = 0; i &lt;= 38 &amp;&amp; m &lt; 22; i++, m++) {
      if (i % 2 != 0) {
          odds[m] = i;
      }
  }
  </code></pre>
  
  <p>However is not working. Any help is appreciated. Thanks.</p>