Click here to Skip to main content
14,739,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What is difference between abstraction and encapsulation?
can anyone provide me a example???

Sorry, this is so pointless!

If this is a school test question, quit this school and sue them for educational fraud, if you can. It has nothing to do with knowledge. If this is an interview question, consider you lucky that you are not working with idiots.

If totally invalid character of this question is no obvious, please read my past answer:
what is the difference between the class and encapsulation in programming[^].

To learn about valid questions, please see this discussion:
How to ask a good question?[^].

If you are willing to down-vote this reply, which sometimes happens in such cases, you are welcome. But I hope you are not willing to join the small group of morons. After all, think who would be the looser.

I wish all the best and real knowledge, not the fakery of multiple-choice tests pseudo-education.

uspatel 13-Feb-12 0:51am
I agree.
Yes It is Diff between apple and Apple........
Right. Thank you, Uma.
Nothing better then Google for this
amolpatil2243 13-Feb-12 0:23am
Uma, you have a lot of real knowledge. How can you seriously answer such questions? Many of the "answers" found on Google is nearly the same fakery as this question.

Please see my reply to for explanation of what I mean...
Good Question Dude!!!!

Encapsulation is hiding something, may be called as data hiding.

Abstraction is showing only the necessary thing..

In other words,

Encapsulation may be implemented using access specifier and
abstraction can be implemented using interface and abstract class..

Hope it helps..

CHill60 14-Dec-13 8:06am
Nope - it's not a good question for this forum. See the link from SA How to ask a good question?[^]
And this is a pretty awful explanation of the difference to be honest

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900