Error with Long datatype in java
<p>Actually my system gives Long.MAX_VALUE as 9223372036854775807</p>

<p>But when I write my program like this,</p>

<pre><code>package hex;

/**
 *
 * @author Ravi
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        long x = 9223372036854775807;

        System.out.println(x);

    }

}
</code></pre>

<p>I am getting compile time error. Can anyone explain the reason?</p>
