I want the static methods of the subclass to also comply with fixed specifications and provide different functions, and
the static methods of the parent class to provide the same functions.
Why doesn't static methods in Java have integrated override and override behavior with ordinary methods? I think it's pretty good? Just because it doesn't follow some logic?
Do you know which programming language has this feature.
Just use singletons instead of statics.
In fact, object-oriented does not require statics.
Kotlin and the like support this very well.
Use companion objects or singleton objects instead of statics.
You can let the companion objects implement that interface. ,
https://kotlinlang.org/docs/r...
First of all. You need to understand what a static method is in java. To a certain extent, rewriting is a manifestation of polymorphism, and static methods in Java are bound to classes. In other words, when this class is loaded, the static methods in the class are also loaded. What is the meaning of inheritance and overriding you said?