Programming - Concept
Encapsulation
Keeping an object's internal details together and limiting how other code can change them
What's it for?
Reduces accidental interference by controlling how different parts of software interact with an object.
For example…
A BankAccount object keeps its balance protected and only allows other code to change it through approved actions such as deposit or withdraw — an example of encapsulation