Question OOP-ABS-0066
HardWhy should high-level modules depend on abstractions rather than concrete classes?
- A.
Because concrete classes are slower
- B.
To make code longer
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Abstraction and Interfaces question
Why should high-level modules depend on abstractions rather than concrete classes?
Because concrete classes are slower
To make code longer
Sign up free to see the answer and a step-by-step explanation.
Java requires it
So implementations can be swapped (for example in tests) without changing the high-level code