nerdexam
Oracle

1Z0-851 · Question #51

1Z0-851 Question #51: Real Exam Question with Answer & Explanation

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

Question

Given: 11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println("B"); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result?

Options

  • AB
  • BThe code runs with no output.
  • CCompilation fails because of an error in line 12.
  • DCompilation fails because of an error in line 15.
  • ECompilation fails because of an error in line 18.

Unlock 1Z0-851 to see the answer

You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 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.

Full 1Z0-851 Practice