21 April 2016

What do you mean by encapsulation in OOP ?



  • 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. 
Encapsulation


  • 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

Featured Post

How to Write PHP code and HTML code within a same file

A PHP file can have both PHP code and HTML code together. Any HTML code written outside of PHP <?php //php code here… ?> Code is ig...

Popular Posts