Saved Bookmarks
| 1. |
Explain the usage of encapsulation? |
|
Answer» Encapsulation is the method of combining the data and functions inside a class. This hides the data from being accessed from outside a class directly, and only through the functions inside the class, it is able to access the information. This is also known as “Data Abstraction”, as it gives a clear separation between properties of data type and the associated implementation details. |
|