nerdexam
Oracle

1Z0-809 · Question #162

Given: Acc.java: package p1; public class Acc { int p; private int r; protected int q; public int s; } Test.java: package p2; import p1.Acc; public class Test extends Acc { public static void…

The correct answer is B. Only p is accessible via obj. You've hit your session limit · resets 10:20pm (America/New_York)

Question

Given: Acc.java: package p1; public class Acc { int p; private int r; protected int q; public int s; } Test.java: package p2; import p1.Acc; public class Test extends Acc { public static void main(String[] args) { Acc obj = new Test(); } } Which statement is true?

Options

  • Ap, r, and s are accessible via obj.
  • BOnly p is accessible via obj.
  • CBoth p and r are accessible via obj.
  • DBoth r and s are accessible via obj.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    79% (19)
  • C
    13% (3)
  • D
    4% (1)

Explanation

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

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice