Abstraction means the situation in which the subject is very general and not based on real situation. Abstract information is general idea or term.
Abstraction is one of the key principal of object oriented programming.
Abstract idea is showing only the necessary details while hiding the irrelevant detail from the user.
For example, while driving a car you know the outer features like what applying break, changing gears, etc would do but you are not required to know how they work or what process they follow to accomplish their task. This in turn reduces the driver’s complexity and increases his efficiency
Why abstraction is required?
To decrease the complexity
To increase the efficiency
In java, abstraction is achieved through:
Abstract class – partial abstraction
Interface – 100% abstraction
We will learn about both of them in upcoming sections.