0
What is encapsulation???
3 Answers
+ 1
The process of combining data variables with some functions in a program is called encapsulation.It is done so that no one can access variable without programmers choice.
In C++ it is achieved by class.
It is something like having medicine inside a capsule you(user) can't access it directly. But you are indirectly using it.Here,the shell of capsule is member function and inside medicine is data variable.Thus,the shell and medicine are encapsulated to achieve some purpose.
0
In Java too, it's used. It's actually a method to implement the abstraction.
It's to wrap up the characterstics and behaviour into a single unit
0
Hi Priyanshi!
Every language that is implemented on OOPs concept uses encapsulation.



