wood burning stoves*
The moose likes Beginning Java and the fly likes enum compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "enum compile error" Watch "enum compile error" New topic
Author

enum compile error

Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333



OCA7
Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

Oh.. got it.I thought, it should take string literal.
Waldemar Macijewski
Ranch Hand

Joined: Jun 22, 2012
Posts: 32
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

Joined: Aug 06, 2012
Posts: 333

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: enum compile error