+ 2

Why we cannot create object of abstract class.

22nd Nov 2017, 4:19 PM
Arpit Srivastava
Arpit Srivastava - avatar
5 Respuestas
+ 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.
22nd Nov 2017, 4:31 PM
Dev
Dev - avatar
+ 8
Just think about who decides if a class is abstract? So you want the class not to be instantiated.. directly.
22nd Nov 2017, 4:41 PM
AZTECCO
AZTECCO - avatar
+ 1
abstract class doesn't contain all abstract method there may be some non abstract methods which can be implemented.
22nd Nov 2017, 4:35 PM
Arpit Srivastava
Arpit Srivastava - avatar
+ 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.
10th May 2018, 5:49 AM
Jyoti Mishra
+ 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
21st Oct 2024, 10:48 AM
SANGRAM VERMA
SANGRAM VERMA - avatar