Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Processing

Post Details

Added on Oct 16 2023
14 comments
313 views