nerdexam
Oracle

1Z0-808 · Question #3

1Z0-808 Question #3: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-808 to reveal the answer and full explanation for question #3. The question stem and answer options stay visible for context.

Working with Inheritance

Question

class A { public A(){ System.out.print ("A "); } } class B extends A{ public B(){ //line n1 System.out.print ("B "); } } class C extends B{ public C(){ //line n2 System.out.print ("C "); } public static void main(String[] args) { C c = new C(); } } What is the result?

Options

  • AC B A
  • BC
  • CA B C
  • DCompilation fails at line n1 and line n2

Unlock 1Z0-808 to see the answer

You've previewed enough free 1Z0-808 questions. Unlock 1Z0-808 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#constructor chaining#implicit super()#inheritance hierarchy#constructor execution order
Full 1Z0-808 Practice