title: Why is Java calling my long variable an int?
body: <p>I'm running this <a href="http://javarevisited.blogspot.com/2012/04/how-to-measure-elapsed-execution-time.html" rel="nofollow">timer example</a>, and I changed <code>i</code> from int to float, to test my machines potential :-) :</p>
  
  <pre><code>    //measuring elapsed time using System.nanoTime
      long startTime = System.nanoTime();
      for(long i=0;  i&lt; 9100080000; i++){
          Object obj = new Object();
      }
      long elapsedTime = System.nanoTime() - startTime;
  </code></pre>
  
  <p>But java complains that:</p>
  
  <pre><code>1 error found:
  File: C:\Users\Adel\Code\Javas\MeasureTimeExampleJava.java  [line: 16]
  Error: integer number too large: 9100080000
  </code></pre>
  
  <p>It's saying "integer", meaning a long integer? But wouldn't long fit 9,100,080,000 into it? 2^63 is 9223372036854775808 .  Any tips appreciated thanks!</p>