What is Encapsulation? Why do we do it?
Answers
Answered by
1
Encapsulation is the wrapping together of data and function. I know this only.
abhisharma50:
first u said me
Answered by
3
Answer:
The system of wrapping data and functions into a single unit is known as encapsulation.
Data encapsulation is the most important feature of a class. The functions used in a class can only access the data items. These functions provide an interface between data items of the objects and the calling program. This is the reason of using encapsulation.
Similar questions