What Is Data Abstraction in Java?

What Is Data Abstraction in Java?

Data abstraction in java is the concept of creating complex data types and only selecting relevant operations to interact with that data type. Abstraction is a core component of object oriented programming

Each OOP language has its own way of implementing abstraction. The general idea behind abstraction is to select only the important properties of an object relevant to the current task while hiding the unimportant ones.

In Java, data abstraction is implemented using the abstract keyword when declaring a class or method. An abstract class in Java is a special type of class that cannot be instantiated.

Note that abstraction and encapsulation are not the same, although they are easily confused. Encapsulation is the concept of wrapping object properties and methods together.