Exam 1z0-819 All QuestionsBrowse all questions from this exam
Question 149

Given:

and

What is the result?

    Correct Answer: D

    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).

Discussion
OmnisumemOption: A

Tested: A.

d7bb0b2Option: A

A is correct, notice: whit the first value of 2 0 0 can get valid option

StavokOption: A

A is correct TESTED