Skip to main content

The strange problem with datatype long of java in eclipse! Please help me.

1 reply [Last post]
chanphat01001
Offline
Joined: 2012-04-08
Points: 0

As i know, the long has length is 64 bits, range from "9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. But in eclipse, when i type "long a = 9999999999" (10 digits), editor of eclipse displays errors at this line, why?

AttachmentSize
Untitled.jpg52.67 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
xylifyx
Offline
Joined: 2003-06-22
Points: 0

Even though assigned to a long, 9999999999 is still an integer literal. If you write 9999999999L instrad it should work.