By default, all enums implicitly extend java.lang.Enum. And as we know, Java doesn't support multiple inheritance, an enum cannot extend any other class.
Read full article from JAVA: Why can’t enum extends any other class? ~ JAVA INTERVIEW QUESTIONS
No comments:
Post a Comment