🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: SOLID in Java: all 10 questions

Quiz: SOLID in Java · Question 8 of 10

Dependency Inversion says high-level modules should depend on:

Dependency Inversion says high-level modules should depend on:

  1. A.Concrete low-level classes, to avoid extra interfaces
  2. B.The database driver directly
  3. C.Static utility methods
  4. D.Abstractions (interfaces) that the low-level classes implement
Answer & explanation

Correct answer: Abstractions (interfaces) that the low-level classes implement

Both sides depend on the interface, so the low-level detail can be swapped.

Can you get the rest right without peeking?

Take the timed Quiz: SOLID in Java quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →