Its said that enums can be nested as top-level type declaration. Does it mean that it can be declared as a data member of a class, but it cannot be declared as a data member of a nested class as the nested class id not top-level ?
daudiam
-6
Junior Poster
Recommended Answers
Jump to Postit is impossible to define a local (§14.3) enum, or to define an enum in an inner class (§8.1.3).
Java Language Reference version 1.6 section 8.9
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.