|
|
new B
would display "(1)" twice, is that new invokes B's default constructor. Because B inherits from A, A's default constructor is invoked displaying the first "(1)". B also includes an instance of A at line 19. That also causes A's default constructor to be invoked resulting in a second display of "(1)".