title: Java: Why does "long" number get negative?
body: <p>I have this code:</p>
  
  <pre><code>    long i = 0;
      while (true) {  
          i += 10*i + 5;
          System.out.println(i);
          Thread.sleep(100);      
      }
  </code></pre>
  
  <p>Why does the <code>long i</code> get negative after a few prints? If the range is exceeded, shouldn't an error occur?</p>