java - Why cannot I assign value to a long variable that is between 2^64 and 2^32? -


i trying test difference between int , long data types , i've learned int has 32 bits whereas long has 64 bits. according this, long data type's maximum value 9,223,372,036,854,775,807. using 13-digit number getting error:

error: integer number large: 2147483645234

long exceedlong = 2147483645234;

i thought long variable should able handle value. i'm using jdk , jre version 8 , i'm compiling , running code in command prompt, using javac , java.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -