Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    What is the Difference Between Data Abstraction and Data Encapsulation in Java?

    Data Abstraction and Data Encapsulation both of these features are considered as the pillars of object-oriented programming language, but they have different functionality and implementation mechanism.

    Let us know how these two OOPs features are different from one another.

    Data Abstraction Data Encapsulation
    Data Abstraction can be described as the technique of hiding internal details of a program and exposing the functionality only. Data Encapsulation can be described as the technique of binding up of data along with its correlate methods as a single unit.
    Implementation hiding is done using this technique. Information hiding is done using this technique.
    Data abstraction can be performed using Interface and an abstract class. Data encapsulation can be performed using the different access modifiers like protected, private, and packages.
    Abstraction lets somebody see the What part of program purpose. Encapsulation conceals or covers the How part of the program's purpose.


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.