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

Given:

Which line of code results in a compilation error?

    Correct Answer: D

    The compilation error occurs on line n4. The reason is that the method 'method()' in the 'Sub' class is attempting to override the 'method()' in the 'Super' class. However, the 'method()' in the 'Super' class is declared as 'final', which means it cannot be overridden. This results in a compilation error.

Discussion
StavokOption: D

Cannot override the final method from Super D is correct

d7bb0b2

this is ok ! final method cannot override

OmnisumemOption: D

Tested: D.

tmuralimanoharOption: D

Answer: D

TADIEWAOption: A

true final method cannot be overridden