Question

Which of the following is NOT a direct benefit of encapsulation?

A Flexibility: The internal implementation of a class can be changed without affecting external code.
B Modularity: Classes become self-contained units.
C Testability: Easier to test individual components in isolation.
D Reduced code duplication across different classes.
E Improved security: Prevents direct manipulation of internal state.
Practice Next

Hey! Ask a query