File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes enum Hierarchy 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 Hierarchy" Watch "enum Hierarchy" New topic

enum Hierarchy

susan waters
Ranch Hand

Joined: Feb 21, 2006
Posts: 68
Too many questions on enums right ?

Is there any hierarchy that we should follow when we declare an enum ?


1. enum should first like Constants
2. enum next should have constructors
3. Next member variables declarations
4. next methods ?

I can try compiling bu putting all these pieces but just thought of asking this...thanks
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
enum constant should come first. Order of 2,3 and 4 does not matter.

Too many questions on enums right ?

Hope you got all your replies.

[ July 27, 2006: Message edited by: Naseem Khan ]

Asking Smart Questions FAQ - How To Put Your Code In Code Tags
I agree. Here's the link:
subject: enum Hierarchy
jQuery in Action, 3rd edition