This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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: 11923

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 ]
I agree. Here's the link:
subject: Abstraction Vs Encapsulation
It's not a secret anymore!