Put an 'L' after your long constant. ie. long myvalue =
1021888800000000002L;

-----Original Message-----
From: Benoit Jodoin [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:52 AM
To: [EMAIL PROTECTED]
Subject: assigning a value to a long type variable


I know it might sound like a weird/simple question...but here's my problem :

that's what im trying to do

long myvalue = 1021888800000000002;
this value is way smaller than Long.MAX_VALUE...

here's the compilation error i get at runtime:

Integer literal out of range.  Decimal
int literals must be in the range -2147483648 to 2147483647. long myvalue =
1021888800000000002;
               ^

there must be a way to do it?

Regards

Ben




--
Benoit Jodoin <[EMAIL PROTECTED]>
Vertical 7

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to