S
Scott Steiner
Hi,
I read that the primitive datatype "long" has the following range:
long, 64-bit, from -2^63 to +2^63-1
i.e from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Why am I getting then a range error in the following code:
long x = 1120833262000;
Date date = new Date(x);
System.out.println(date.toLocaleString());
I'm getting the error: "The literal 1120833262000 of type int is out of
range"
Thanks for any help.
I read that the primitive datatype "long" has the following range:
long, 64-bit, from -2^63 to +2^63-1
i.e from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Why am I getting then a range error in the following code:
long x = 1120833262000;
Date date = new Date(x);
System.out.println(date.toLocaleString());
I'm getting the error: "The literal 1120833262000 of type int is out of
range"
Thanks for any help.