Help Us Improve. Please let us know if you were asked any question in your interview.

More Questions

Java - Interview Questions and Answers on Information / Data Hiding

Q1.  Difference between Encapsulation and Data Hiding ?

Ans. Data Hiding is a broader concept. Encapsulation is a OOP's centri concept which is a way of data hiding in OOP's.  

Q2.  Difference between Abstraction and Implementation hiding ?

Ans. Implementation Hiding is a broader concept. Abstraction is a way of implementation hiding in OOP's.

Q3.  What is difference between Encapsulation And Abstraction?

Ans. 1.Abstraction solves the problem at design level while encapsulation solves the problem at implementation level

2.Abstraction is used for hiding the unwanted data and giving relevant data. while Encapsulation means hiding the code and data into a single unit to protect the data from outside world.

3. Abstraction lets you focus on what the object does instead of how it does it while Encapsulation means hiding the internal details or mechanics of how an object does something.

4.For example: Outer Look of a Television, like it has a display screen and channel buttons to change channel it explains Abstraction but Inner Implementation detail of a Television how CRT and Display Screen are connect with each other using different circuits , it explains Encapsulation.


Stay updated with Java posts in your email.

Enter your email address:


Delivered by FeedBurner
Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus




×

Would like to try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests. It's updated daily and It's Awesome.


×

Would like to try our new Java Practice Test tool.

There are more than 100 questions currently and expanding quickly. It's updated daily and It's Awesome.