Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Why doesn't java support that enumerated classes can inherit and abstract classes can't have static abstract methods?

user-y5bwdOct 16 2023

If the enumeration class can be inherited, it can solve the problem of error code expansion very well, because the parent or upper level application design only contains simple, basic or public error codes, and the lower level application needs to expand a lot of error codes in the face of actual application situations.

Can abstract classes have static abstract methods? Then you can have a good specification for its subclasses.

Comments
Post Details
Added on Oct 16 2023
14 comments
123 views