Solved

Why Does Using the Protected Access Modifier Compromise Encapsulation

Question 18

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents