- Encapsulation is a programming mechanism that binds together code and the data it manipulates and apply restricting access to some of the object's components.
- In an object-oriented language, it is a language construct that facilitates the bundling of data with the methods or other functions operating on that data.
- Class (extensible program-code-template for creating objects) is used to ensure encapsulation of data and method in Object Oriented Programming.
Intro to Java Programming, Comprehensive Version (10th Edition)
Java: How to Program, 9th Edition (Deitel)
No comments:
Post a Comment