Multiple Inheritance and class Object

后端 未结 5 1296
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 00:21

I am pretty new to OOP. We all know that Java does not support multiple inheritance; however, all Java classes inherit from Object and can also inherit from ano

5条回答
  •  时光取名叫无心
    2020-12-04 00:53

    Your class that extends that other class, but it extends Object, too, so you're still in one line of inheritance, not multiple inheritance.

    It calls as a multi-level inheritance. not multiple inheritance.

提交回复
热议问题