juniorOOP
What is abstraction in OOP?
Updated May 17, 2026
Short answer
Abstraction hides implementation details and shows only functionality.
Deep explanation
It focuses on 'what' an object does instead of 'how' it does it, often implemented via abstract classes or interfaces.
Real-world example
Driving a car without knowing engine mechanics.
Common mistakes
- Thinking abstraction is the same as encapsulation.
Follow-up questions
- How is abstraction different from encapsulation?
- Where is abstraction used in APIs?