Inheritance vs Static in Java

后端 未结 6 1891
温柔的废话
温柔的废话 2020-12-06 15:17

I dont quite understand why Static methods can be inherited in Java ?

Inheritance is like inheriting from the base class AND Static belongs to the Class and not Obje

6条回答
  •  一向
    一向 (楼主)
    2020-12-06 16:08

    As you state, the static method belongs to the class and since inheritance describes a IS-A relationship between types does it not stand to reason that a subclass would inherit all of the members of its superclass?

    I personally think this implementation makes a lot of sense!

提交回复
热议问题