Encapsulation is the practice of bundling data and the methods that operate on that data within a class, while controlling access to the internal state. It helps protect invariants and reduces unwanted coupling.
Question
What is encapsulation in object-oriented programming?
Answer
Reviewed technical question and answer.
Leave a Reply