title: Testing oddity of an integer with the modulo operator
body: <p>The following code snippet does not test oddity correctly:</p>
  
  <pre><code>public static boolean isOdd(int i) {
     return i % 2 == 1;
  }
  </code></pre>
  
  <p>I read in the web that I should do it the following way:</p>
  
  <pre><code>public static boolean isOdd(int i) {
     return i % 2 != 0;
  }
  </code></pre>
  
  <p>Why is this?</p>