posted 6 years ago
HI Jae, do you aware of 'super()' ?
In a sub class constructor, compiler runs 'super()' as the first statement. This is implicit call and happens automatically by the compiler. In your case,
class B is super class and class A is sub class. So when you call class A constructor it will call 'super()' implicitly which then calls super class no args constructor.
that's why you see first B class constructor statement executes then A class statement executes.