Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oops concept

 
vibhas karn
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody explain me the difference between abstraction and encapsulation twith real life example. I am really confused with this.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the topic, difference between abstraction and encapsulation.

(A Google search on "java abstraction encapsulation" also yields some good results.)

If you're still stuck, tell us exactly what you're confused about.
 
vibhas karn
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok what i understood is abstraction tells you "what the system is doing" and not how it is doing. That is you are not bother about the implementation details how the systems works. Similarly Encapsulation hides the implementation details from the user. So the implementation details is the main problem for me in abstraction you dont bother about the implementaion and in encapsulation you are not allowed to know the implemenation. Both these things seems very much confusing to me. Can you give me some real life example so that i can judge the difference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic