Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
protected allowed in enum. So extending enum types possible?
Firas Zuriekat
Ranch Hand
Posts: 144
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The following compiles fine:
public enum MyEnum { MyEnum(){protected int getSize(){return 1;}}; protected int size=0; static MyEnum test; MyEnum(){}; }
So is extending MyEnum allowed? I mean could the protected member above be overridden?
[ June 02, 2006: Message edited by: Firas Zureikat ]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
enum and inner class
i want some information related to enum keyword
JPA enum mapping by explicit getId()
enum constructors
"casting" an int to an enum type
More...