Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Difference between Abstraction and Encapsulation in Java

What is an Abstraction in Java?

An Abstraction is a process of showing all the required items and protecting the rest.

What is Encapsulation in Java?

Encapsulation is the process of binding up data under a single entity.

Difference between Abstraction and Encapsulation in Java

S.No. Abstraction Encapsulation
1 Abstraction is the process of obtaining data. It is the method to receive the information.
2 We can resolve the problems at the interface or design level. We can resolve issues at the execution level.
3 Through abstraction, we can hide unwanted data. Through encapsulation, we can protect the data in a separate entity.
4 We can execute abstraction using interfaces and abstract classes. It can be executed by using an access modifier.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cut off, GATE Previous Year Question Paper, and more.

Also Explore,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*