how non-static enum can be accessed without object?
Mahesh Murugaiyan
Greenhorn
Joined: Jun 25, 2009
Posts: 21
posted
0
Hello,
This is Question #3 in practice exam 2 in Bates/Sierra's Practice Exam book.
Numinor is a stand alone class with the "Members" enum. How can this enum(which is a non-static member of Numinor) accessed without creating an object for Numinor class?
Mahesh Murugaiyan wrote:How can this enum(which is a non-static member of Numinor) accessed without creating an object for Numinor class?
But that question is based on the incorrect assertion that the enum is a non-static member of the class in which it's declared. Once you drop that idea, there's no problem at all.
Thanks Ninad. Thanks Paul, yes, thats makes total sense. Other than enum, interface(constants) are there any other entitiy that is implicitly static ? I will add this to my study notes.