| |
GeekInterview.com > Interview Questions > Concepts > OOPS
| Print | |
Question: Explain the Encapsulation principle
Answer: Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper. |
| June 06, 2006 04:19:41 |
#4 |
| vvijaychandra |
Member Since: June 2006 Total Comments: 8 |
RE: Explain the Encapsulation principle |
| storing the data and a function in a single class is know as encapusulation.data cannot be accessible to the outside world and only those fuctions which are stored in the class can access it. |
| |
Back To Question | |