aspose file tools*
The moose likes Beginning Java and the fly likes Oops concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Oops concept" Watch "Oops concept" New topic
Author

Oops concept

vibhas karn
Greenhorn

Joined: Aug 11, 2008
Posts: 26
Can anybody explain me the difference between abstraction and encapsulation twith real life example. I am really confused with this.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

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.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
vibhas karn
Greenhorn

Joined: Aug 11, 2008
Posts: 26
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.
 
 
subject: Oops concept