What is exact difference between Inheritance and Abstract class?

后端 未结 5 913
心在旅途
心在旅途 2021-02-06 00:46

I know the fundamentals of OOP concepts[Inheritance, Abstraction, Encapsulation, Polymorphism]

We use Inheritance in case of Parent-Child relationship[C

5条回答
  •  臣服心动
    2021-02-06 01:16

    An abstract class means you can't instantiate it directly.

    new Parent()
    

    is not allowed.

    An abstract method will need to be implemented in an extended class.

提交回复
热议问题