Ans:
- java encapsulation is wrapping up of the data into single unit.
- The process of hiding all the details of an object that do not contribute to its essential characteristics
- for example if we declare the members(variable or method) public then we access the members into anywhere, but if we declare the private then we cant access the members out of class this is called encapsulation.
No comments:
Post a Comment