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

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

python - How to use Celery in Tornado with redis as broker and backend? -