Reputation: 97
Public enum BASECOLORS {
GREEN,
RED
}
public enum ALLCOLORS {
VOILET,
ORANGE
}
in the above code how can I access ALLCOLORS.GREEN? ALLCOLORS should have direct access to the BASECOLORS..
Please help me with your suggestions...
Upvotes: 1
Views: 563
Reputation: 12979
This is not possible. Enums are primitives and cannot inherit from other enums, as inheritance is a property of objects.
Upvotes: 1