nerdexam
Oracle

1Z0-809 · Question #30

Given the fragments: public class TestA extends Root { public static void main (String[] args) { Root r = new TestA(); System.out.println(r.method1()); // line n1 System.out.println(r.method2()); //…

The correct answer is A. Line n1. You've hit your session limit · resets 5:20pm (America/New_York)

Question

Given the fragments: public class TestA extends Root { public static void main (String[] args) { Root r = new TestA(); System.out.println(r.method1()); // line n1 System.out.println(r.method2()); // line n2 } } class Root { private static final int MAX = 20000; private int method1() { int a = 100 + MAX; Return a; } protected int method2() { int a = 200 + MAX; return a; } } Which line causes a compilation error?

Options

  • ALine n1
  • BLine n2
  • CLine n3
  • DLine n4

How the community answered

(41 responses)
  • A
    83% (34)
  • B
    5% (2)
  • C
    10% (4)
  • D
    2% (1)

Explanation

You've hit your session limit · resets 5:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice