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 Java in General and the fly likes Enum doubt 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 » Java in General
Bookmark "Enum doubt" Watch "Enum doubt" New topic

Enum doubt

Abdul Mohsin
Ranch Hand

Joined: Apr 26, 2007
Posts: 111


Can anyone explain me how a simple enum class say
enum{RED,BLUE,BLACK} is compliled and converted into class file.
I was just compiling it in verbose mode and found that Enum class is loaded before Object.

Please expain it.


Abdul Mohsin

Regards, Abdul Mohsin
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
A little beyond the scope of SCJP. Moving to one of our Java in General forums...

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
It is sorta covered in the JavaRanch Style Guide.
subject: Enum doubt
Similar Threads
Which is better? Declaring constants in a class or Declaring them in interface?
Creating SingleTON without static variables
Private Instance Variables In Enums
retrieve enumeration datatype into jsp
How to define constants for several classes?