aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ENUM the real ghost arrives.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ENUM the real ghost arrives.." Watch "ENUM the real ghost arrives.." New topic
Author

ENUM the real ghost arrives..

deepesh mathur
Ranch Hand

Joined: Aug 13, 2007
Posts: 39
hi all Ranchers,
i just want to ask that:
1.what for this enum is made?
2.what does one mean by "CONSTANT SPECIFIC CLASS BODY"
kindly explain in detail whatever you know please and thanks in advance..
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by deepesh mathur:
...1.what for this enum is made?...

I'm sorry, I'm not sure what you're asking here. For a general overview of what enums are, and what they're for, see this article: Enums
Originally posted by deepesh mathur:
...2.what does one mean by "CONSTANT SPECIFIC CLASS BODY"...

It means that you can create a class body for each enum constant. See the example at the end of JLS 8.9 Enums.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
deepesh mathur
Ranch Hand

Joined: Aug 13, 2007
Posts: 39
hello sir ,
i think you've misunderstood ENUM is a keyword in java (added in 5.0 only)
and same is for that CONSTANT SPECIFIC CLASS BODY i need that specification
and by the way thanks...
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18990
    
  40

Originally posted by deepesh mathur:
hello sir ,
i think you've misunderstood ENUM is a keyword in java (added in 5.0 only)
and same is for that CONSTANT SPECIFIC CLASS BODY i need that specification
and by the way thanks...


There is a new keyword "CONSTANT SPECIFIC CLASS BODY"? Where did you read this?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
Originally posted by deepesh mathur:
hi all Ranchers,
i just want to ask that:
1.what for this enum is made?
2.what does one mean by "CONSTANT SPECIFIC CLASS BODY"
kindly explain in detail whatever you know please and thanks in advance..

Hi Deepesh,

Marc already provided you with some good links explaining the concepts you asked about. If you have a more specific query, it's best that you explain your own current understanding and then list the concepts you're unsure about. It takes a lot of effort to "explain in detail whatever you know" (after all, people even get paid to write books on these things!), and most of us are just volunteers here--so you'll get more and better responses if you take a few minutes to pose more specific questions.

All the best!


SCJP 5.0
 
Consider Paul's rocket mass heater.
 
subject: ENUM the real ghost arrives..