File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enum compile error

 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh.. got it.I thought, it should take string literal.
 
Waldemar Macijewski
Ranch Hand
Posts: 32
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umm, call me an amatuer but your code looks strange from the start. First you declare an interface but never actually implement anything, then you have enumeration declared inside interface. Enum constants (or objects) are implicitly final, so do fields in interfaces, so would you need both? While I don't know if this the right practise, but this post might be useful for both of us. Also you usually access enum constants in a static way: EnumName.Member. There was a similiar post some time ago.
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okti Wmcijewski wrote:Umm, call me an amatuer but your code looks strange from the start. First you declare an interface but never actually implement anything, then you have enumeration declared inside interface. Enum constants (or objects) are implicitly final, so do fields in interfaces, so would you need both? While I don't know if this the right practise, but this post might be useful for both of us. Also you usually access enum constants in a static way: EnumName.Member. There was a similiar post some time ago.


Thank you ,i will read those posts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic