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
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:
Post a Comment