title: why 0x80000000 and its long form are different?
body: <p>I am trying to implement error code with bits. Its like:</p>
  
  <pre><code>public static final long ERROR_1 = 0x1;
  public static final long ERROR_2 = 0x2;
  public static final long ERROR_3 = 0x4;
  public static final long ERROR_4 = 0x8;
  .
  .
  .
  </code></pre>
  
  <p>but when i add <code>0x80000000</code>, output is <code>-2147483648</code>.  If change the value to <code>0x80000000l</code>, output is <code>2147483648</code>. I am confused. Can somebody expain me why output is different and which one i should use?</p>
  
  <pre><code>System.out.println(0x80000000);       //-2147483648
  System.out.println(0x80000000l);      //2147483648
  </code></pre>