how data is hidden and safe if encapsulation is implemented?explain with example
Answers
Answered by
0
The primary use for encapsulation is to hide implementation details from calling cøde. When calling cøde wants to retrieve a value, it should not depend on from wherethe value comes. Internally, the class can store the value in a field or retrieve it from some external resource (such as a file or a database).
Similar questions
Math,
1 month ago
English,
1 month ago
Social Sciences,
1 month ago
English,
2 months ago
Social Sciences,
2 months ago
Science,
10 months ago
Math,
10 months ago