What is Encapsulation?
1)Encapsulation is one of the fundamental principles of object-oriented programming.
2)Encapsulation is a process of hiding all the internal details of an object from the outside world
3)Encapsulation is the ability to hide its data and methods from outside the world and only expose data and methods that are required
4)Encapsulation is a protective barrier that prevents the code and data being randomly accessed by other code or by outside the class
5)Encapsulation gives us maintainability, flexibility and extensibility to our code.
6)Encapsulation makes implementation inaccessible to other parts of the program and protect from whatever actions might be taken outside the function or class.
7)Encapsulation provides a way to protect data from accidental corruption
8)Encapsulation hides information within an object
9)Encapsulation is the technique or process of making the fields in a class private and providing access to the fields using public methods
10)Encapsulation gives you the ability to validate the values before the object user change or obtain the value
11)Encapsulation allows us to create a "black box" and protects an objects internal state from corruption by its clients.
Encapsulation is a procedure of covering up of the data & functions into a single unit called as class . An Application is nothing but combination of classes working as units to accomplish task.In Encapsulation fields of a class can be read-only or can be write-only.