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

Given:

and

What is the result?

    Correct Answer: D

    The code will fail to compile due to an error in line 1. In the Person class, a parameterized constructor is explicitly defined. Therefore, the default no-argument constructor is not implicitly created. When attempting to create a new instance of Person using the no-argument constructor (new Person()), the compiler will throw an error because the no-argument constructor does not exist.

Discussion
OmnisumemOption: D

tested

d7bb0b2Option: D

Contructor withot parameter no exist

d7bb0b2

Remember : if you create a explicit constructor with parameters, musth be create too the constructor without parameter if you want to use it. Because Java no create default constructor with no parameter when other constructor exist