Solved

Why Does Using the Protected Access Modifier Compromise Encapsulation

Question 53

Multiple Choice

Why does using the protected access modifier compromise encapsulation?


A) Multiple classes can set the value of an instance variable defined in another class.
B) When a class does change a protected value, there is added maintenance complexity.
C) Subclass methods that directly set the value of a protected instance variable need to be verified.
D) When high performance is essential, superclass methods can be used to change the value of protected variables.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions