Given the code fragment: What is the result?
A.
Jesse 25 Walter 52
B.
Compilation fails only at line n1
C.
Compilation fails only at line n2
D.
Compilation fails at both line n1 and line n2
Given the code fragment: What is the result?
A.
Jesse 25 Walter 52
B.
Compilation fails only at line n1
C.
Compilation fails only at line n2
D.
Compilation fails at both line n1 and line n2
d
OPtion D is the answer
Definitely D.
Answer: D
??
B
D
there is no this() can’t be call in n1
Person(name) should be changed to this(name) in n2
Correct answer is D.
The code compile if you replace in the first constructor “this()” with “this (name,age)” and in the second constructor “Person(name,age)” with “this(name,age)”
Regards.
en la D