What's the point in having an abstract class with no abstract methods?

后端 未结 9 1464
一整个雨季
一整个雨季 2021-01-02 21:11

Can have an abstract class implementing all of its methods-- with no abstract methods in it.

Eg.:

public abstract class someClass          


        
9条回答
  •  轮回少年
    2021-01-02 21:28

    • you can declare to implement an interface and don't provide implementation and then each child implicitly gets interface extended

    • you prevent to create instance of this class

    • you in future provide common implementation to all children

提交回复
热议问题