Which of the following statements is not true? A. An instance of one class may access an
Question:
Which of the following statements is not true?
A. An instance of one class may access an instance of another class’s attributes if it has a reference to the instance and the attributes are declared public.
B. An instance of one class may access package-private attributes in a parent class, provided the parent class is not in the same package.
C. An instance of one class may access an instance of another class’s attributes if both classes are located in the same package and marked protected.
D. Two instances of the same class may access each other’s private attributes.
E. All of the above are true.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky
Question Posted: