title: Why does the modulus not help to find negative odd number?
body: <p><strong>What I am doing:</strong> Replacing odd numbers(values) in array with zeros.<br><br>
  <strong>Problem:</strong> when executing following code it replaces only <em>positive</em> numbers, ignoring <em>negative</em>.<br><br>
  <strong>Code</strong>: <br></p>
  
  <pre><code>    public static int[] nullOddValues(int[] array) {
  
          int[] resultArray = new int[array.length];
  
          for (int i = 0; i &lt; array.length; i++) {
              if (array[i] % 2 != 0) {
                  resultArray[i] = 0;
              } else {
                  resultArray[i] = array[i];
              }
          }
  
          return resultArray;
      }
  </code></pre>