title: How to print long primitive in Java
body: <p>Relatively new to Java and possibly some stupid question. Here is the code:</p>
  
  <pre><code>long a = 3232235521L;
  long b = 192 * 16777216 + 168 * 65536 + 0 * 256 + 1;
  
  System.out.println("a="+a);
  System.out.println("b="+b);
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>a=3232235521
  b=-1062731775
  </code></pre>
  
  <p>According to Java documentation max value for long 2^63-1 and that is: 9223372036854775807. So for b, there is no overflow, so why b isn't 3232235521?   </p>