nerdexam
Exams1Z0-803Questions#259
Oracle

1Z0-803 · Question #259

1Z0-803 Question #259: Real Exam Question with Answer & Explanation

The correct answer is B: Overridden 20. See the full explanation below for the reasoning.

Question

Given: class Base { public static void main(String[] args) { System.out.println("Base " + args[2]); } } public class Sub extends Base{ public static void main(String[] args) { System.out.println("Overriden " + args[1]); } } And the commands: javac Sub.java java Sub 10 20 30 What is the result?

Options

  • ABase 30
  • BOverridden 20
  • COverridden 20
  • DBase 30

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice