title: When calculating the factorial of 100 (100!) with Java using integers I get 0
body: <p>When doing this:</p>
  
  <pre><code>int x = 100;
  int result = 1;
  for (int i = 1; i &lt; (x + 1); i++) {
      result = (result * i);
  }
  System.out.println(result);
  </code></pre>
  
  <p>This is clearly because the result is too big for an integer, but I am used to get big negative numbers for the overflow, and not 0.</p>
  
  <p>Thanks in advance!</p>
  
  <hr>
  
  <p>When I switch to this:</p>
  
  <pre><code>int x = 100;
  int result = 1;
  
  for (int i = 1; i &lt; (x + 1); i++) {
      result = (result * i);
      System.out.println(result);
  }
  </code></pre>
  
  <p>I get <a href="http://pastie.org/1675920" rel="noreferrer">this</a>.</p>