And if class A has constructor called A() suppose i created an Object of class B then the compiler initializes the base class first ieclass A and then initialize the class B Then.......?
Actually you are mistaken:
When you create an object of class B, constructor B is called. If you do not specify how constructor B calls constructor, then the compiler automatically inserts the default constructor call A as the first action in the initializer list.
If you do not want to use the default constructor, you must explicitly put the call into the corresponding constructor A as the first element in the list of initializers.
When construction A is completed, construction B will continue.
First thing is we can not access a constructor of any class without an Object then how it is initialize the constructor of abstract class if we can not create an object of abstract class .
You say above as if you were considering A and B different things. An object of class B is also an object of class A. It is a valid object as a whole. The whole object has class B, but it contains (as part of the same object) all the information received from class A.
source share