Oracle
1Z0-808 · Question #54
1Z0-808 Question #54: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-808 to reveal the answer and full explanation for question #54. The question stem and answer options stay visible for context.
Working with Methods and Encapsulation
Question
package p1; public class Acc { int p; private int q; protected int r; 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
- ABoth p and s are accessible by obj.
- BOnly s is accessible by obj.
- CBoth r and s are accessible by obj.
- Dp, r, and s are accessible by obj.
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
#Access Modifiers#Encapsulation#Package-private#Inheritance