OOPs Concept: Encapsulation
Encapsulation
- It is process of wrapping up data member & methods together into a single unit.
- Every Java Class is an example of encapsulation.
- Two ways of achieving Encapsulation:
b) Provide public setter & getter method
Encapsulation
Comments
Post a Comment