Explain Data Encapsulation?

Asked 27-Apr-2022
Viewed 367 times

1 Answer


0

  • Encapsulation is the concept of packaging data and functions that work on that data into a single entity, similar to a Java class. This idea is also frequently used to conceal an object's internal representation or state from the outside world. This is known as information concealment.
  • Data encapsulation is an Object Oriented Programming paradigm that treats a collection of related attributes, methods, and other components as a single entity. The best example of Data Encapsulation is a class. It's also known as data concealing because it stops the user from seeing the implementation details. As a result, encapsulation ensures the data contained in the Object's integrity.


Read More: What is Ethernet?