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:

Question Posted: