TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sai Kumar Koona
238
8k
1.6m
Understand Data Encapsulation
May 28 2012 1:17 AM
Data encapsulation/ data hiding is an important feature of object oriented programming. The mechanism of hiding data is to put them in a class and make them private. The data is now hidden and safe from any accidental manipulations, i.e. no function (from outside the class) can change the member data. Actually there are two things you can hide: implementation of functions (to the user it doesn't matter as to how you've implemented a particular function) and data. In procedural programming it is possible to only hide the implementation details but you cannot hide/ protect data. OOP lets you achieve this. A simple example is the case of the 'car' (Explained in Data Abstraction, go through the next question). We don't want the user to directly access 'speed' and modify it. By making 'speed' private, we prevent the user from doing this.
Reply
Answers (
4
)
Hosting web site on my server
What is strogly typed means ?