File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Compile error Enum Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Compile error Enum" Watch "Compile error Enum" New topic
Author

Compile error Enum

Lorenzo Tagliaferro
Greenhorn

Joined: Jun 15, 2009
Posts: 20

Hi all,

I'm trying to compile a simple enum:



I receive 1 error:


Elaborator.java:5: integer number too large: 9223372036854775797
Num1(9223372036854775797),
^
1 error


I don't understand why!!

Thanks!

Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3011
    
    9
Non floating point numeric literals in Java are considered to be integers and that number is too large to be an integer. If you want it to be considered a long put L on the end


Note - always use a capital L for this as a lowercase l might be mistaken for the digit 1.


Joanne
Lorenzo Tagliaferro
Greenhorn

Joined: Jun 15, 2009
Posts: 20

Thank you Joanne! :-)

I solvedt!!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Compile error Enum
 
Similar Threads
Fractions
probelm with errors
"private" access
Large Numbers
Need help with Overloading Methods