← Quiz: SOLID Principles: all 10 questions
Quiz: SOLID Principles · Question 6 of 10
What is the difference between Dependency Inversion and Dependency Injection?
What is the difference between Dependency Inversion and Dependency Injection?
- A.They are two names for the same thing
- B.Injection is a principle; Inversion is a framework
- C.Inversion is the principle (depend on abstractions); injection is a technique to achieve it (pass dependencies in)
- D.Inversion is only for Python
Answer & explanation
Correct answer: Inversion is the principle (depend on abstractions); injection is a technique to achieve it (pass dependencies in)
Spring performs dependency injection, which helps you follow dependency inversion.
Can you get the rest right without peeking?
Take the timed Quiz: SOLID Principles quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →