This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Abstraction Vs Encapsulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstraction Vs Encapsulation" Watch "Abstraction Vs Encapsulation" New topic

Abstraction Vs Encapsulation

rajesh mara

Joined: Nov 30, 2006
Posts: 11

I am a fresher n in interviews i have been asked abt the differences between Abstraction and Encapsulation can anyone please reply with an example each abt the difference

Thank You.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11153

The best way to learn is to do some research, then come here with specific questions. There are tons of resources, both print and online. try finding the answer yourself first, and when you get stuck or confused, ask about that.

or, if you think you know the answer, post it, and say "is this right?"

You'll learn much more that way, and probably get the answer much faster.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Anthony Nadar

Joined: Feb 07, 2008
Posts: 1
I agree with Fred. That was a fantastic answer and a the reader has to be a optimistic to take advantage of your words.
[ February 07, 2008: Message edited by: Anthony Nadar ]
It is sorta covered in the JavaRanch Style Guide.
subject: Abstraction Vs Encapsulation
Similar Threads
Encapsulation and abstraction confusing?
difference between abstraction and encapsulation
4 key points about Oops