+ 2
Why we cannot create object of abstract class.
5 ответов
+ 14
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.
+ 8
Just think about who decides if a class is abstract?
So you want the class not to be instantiated.. directly.
+ 1
abstract class doesn't contain all abstract method there may be some non abstract methods which can be implemented.
+ 1
As abstract class is a class which is defined with abstract keyword i.e.,a class which is meant not to be instantiated is by the programmer or any of its method's implementation is not known. So, what's the use of creating an instance of a class not having everything properly defined. This is the reason abstract class is not instantiated.
+ 1
In Abstract Class we cannot make object, because (I easy way to explain) when we created object then with the help of this we can call method or function and in abstract class have no body in method or in function