Why can't we instantiate an abstract class in Java?

前端 未结 16 1013
挽巷
挽巷 2020-12-08 05:36

I understand:

  1. Since an abstract class is nothing on its own, e.g. vehicle, we want to create an object of an concrete implementation, like Car, Bike, etc.
16条回答
  •  臣服心动
    2020-12-08 06:07

    Because an abstract class is an incomplete class (incomplete in the sense it contains abstract methods without body and output) we cannot create an instance or object; the same way you say for an interface.

提交回复
热议问题