🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.They are two names for the same thing
  2. B.Injection is a principle; Inversion is a framework
  3. C.Inversion is the principle (depend on abstractions); injection is a technique to achieve it (pass dependencies in)
  4. 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 →