Which one of the following is known as the key to object-oriented programming?
Correct answer
B. Encapsulation
13 views
B. Encapsulation
13 views
Encapsulation is described as the key to object-oriented programming in the source text for this question: an object hides its internal data and exposes only a controlled interface.
Because client code cannot reach inside the object, the implementation can change freely. Polymorphism and abstraction build on this foundation rather than replace it.
Practise more Computer Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.