Given:
and
What is the result?
Given:
and
What is the result?
When a new Thing object is created using the default constructor, it first calls the constructor Thing(int, int) with values (2, 1). This constructor then calls the constructor Thing(int), which calls the default constructor again. The constructor chain ends after printing the assigned values. Since Thing's fields x, y, and z are not explicitly initialized, they default to 0. Thus, the sequence of print statements is as follows: 0, 0, 0 from the default constructor, 2, 1, 0 from Thing(int, int), and 2, 1, 0 from Thing(int).
Tested: A.
A is correct, notice: whit the first value of 2 0 0 can get valid option
A is correct TESTED