What do you mean by encapsulation
Answers
Answered by
10
Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea of bundling data and methods that work on that data within one unit, e.g., a class in Java. This concept is also often used to hide the internal representation, or state, of an object from the outside.
Answered by
6
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates.Other way to think about encapsulation is, it is a protective shield that prevents the data from being accessed by the code outside this shield.
Similar questions
India Languages,
6 months ago
Math,
6 months ago
Social Sciences,
6 months ago
Math,
1 year ago
Math,
1 year ago