What is Encapsulation explain with Example?
The Encapsulation is very important and basic features OOP, In Encapsulation binding the data member and methods in single unit (in Class) is nothing but Encapsulation.
Public: Available the inside, derived (inherited) class and outside of class.
Private: Available in inside the class only.
Protected: Available in inside class and derived (inherited) class.