Q:

What is data abstraction in Java?

A:

Quick Answer

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

Continue Reading

Full Answer

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.

Learn more about Computer Programming

Related Questions

Explore