A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
enum Hierarchy
susan waters
Ranch Hand
Joined: Feb 21, 2006
Posts: 68
posted
Jul 27, 2006 18:32:00
0
Too many questions on enums right ?
Is there any hierarchy that we should follow when we declare an enum ?
like
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
posted
Jul 27, 2006 19:25:00
0
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.
Naseem
[ 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:
http://aspose.com/file-tools
subject: enum Hierarchy
Similar Threads
Design Question
cleared SCJP on March24
enum - couple of questions
Using Enumerations
Strange Enum behaviour?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter