Why is data abstraction important?

Asked by Aurelia Mckinnon on November 20, 2021

Categories: Technology and computing Programming languages

Rating: 4.2/5 (72 votes)

Abstraction is selecting data from a larger pool to show only the relevant details to the object. It helps to reduce programming complexity and effort. In Java, abstraction is accomplished using Abstract classes and interfaces. It is one of the most important concepts ofOOPs.

Why abstract class is used in Java? Java Abstract class can implement interfaces without even providingthe implementation of interface methods. Java Abstract class is used to provide common method implementation to all the subclasses or to provide default implementation. We can run abstract class in java like any other class if it has main method.

What is abstraction example? Abstraction means displaying only essential information and hiding the details. Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation. Consider a real life example of a man driving a car. This is what abstraction is.

Can abstraction be an example for everyday life? Another real life example of Abstraction is ATM Machine; All are performing operations on the ATM machine like cash withdrawal, money transfer, retrieve mini-statement…etc. but we can't know internal details about ATM. Note: Data abstraction can be used to provide security for the data from the unauthorized methods.