The literal @@@@ of type int is out of range

When I tried to assign a variable of long data type with the following in java

long x = 1429278000000;

I got the following compilation error

"The literal 1429278000000 of type int is out of range"

I got it resolved by adding capital L to the end.
long x = 1429278000000L;

Otherwise, the compiler will try to parse the literal as an int

No comments:

 My Attempt to learn AI  GPT Generative Pretrained Transformer Created by Google in 2017 with the publication of the paper "Attention ...

Popular in last 30 days