☝️Объяснение:
1) Call new House("x ");
2) invoke House(String name) {}; - constructor with argument String ;
3)call this();
4)invoke House(){}; - default constructor
5) call super();
6)always invoke default constructor Building(){}; - execute code and print "b";
7)return to House default constructor - execute code and print "h";
8)return to House constructor with argument String - execute code and print "hn x ", where "x " - paremeter new House("x ");
9)and result "b h hn x ";
Выглядит как цепочка! Очень хороший пример
Post #901
3.12K
- 👍 15