This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes the enum-value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "the enum-value "final" ?" Watch "the enum-value "final" ?" New topic
Author

the enum-value "final" ?

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I have something like this:

enum{start, final;}

however, final is a java-reserverd word. How can I use the word "final" in my enum-value?
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I have solved that via using another word instead final.
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
Why not have it in Cap Case if you want "final" only and not another word like "End"?
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
oh yes of course: FINAL :-)

thanks.
 
jQuery in Action, 2nd edition
 
subject: the enum-value "final" ?
 
Similar Threads
about enum
Quick question about enum field
Strange Enum behaviour?
Declaring Enums in a class
enum cannot be final or abstract