0

What is use of abstact class constructor ?

Use of abstract class constructors when object creation is not supported for abstract class?

18th Dec 2019, 11:13 AM
Ajoh Pv
Ajoh Pv - avatar
2 Respuestas
+ 3
But it can be used as a reference for the instance of the concrete class which is extending that abstract class and providing implementation for all abstract methods. You can call the constructor of abstract class through the class extending it using super method.
18th Dec 2019, 11:26 AM
Avinesh
Avinesh - avatar
0
You can initialize shared attributes of childs simply by calling parent constructor: super(a, b, ...)
18th Dec 2019, 11:21 AM
Evgeny Malikov
Evgeny Malikov - avatar