File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compile error Enum

 
Lorenzo Tagliaferro
Greenhorn
Posts: 20
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lorenzo Tagliaferro
Greenhorn
Posts: 20
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Joanne! :-)

I solvedt!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic