Encapsulation:
- Binding of data and methods as single unit.
e.g: class
Advantage:
- we can use the same varaible or names in different classes.
If any class contains DataHiding + Abstraction , we call it as Encapsulation.
e.g: javabean or POJO (plain old java object)
Advantage:
- It increases security
- Enhancement is easy.
- Improves maintainability.
- Binding of data and methods as single unit.
e.g: class
Advantage:
- we can use the same varaible or names in different classes.
If any class contains DataHiding + Abstraction , we call it as Encapsulation.
e.g: javabean or POJO (plain old java object)
Advantage:
- It increases security
- Enhancement is easy.
- Improves maintainability.
No comments:
Post a Comment