0

Of the five SOLID Principles, Dependency Inversion is one of them and the last one.

Can I quote JDBC interface as an example of Dependency Inversion Principle?

joven
  • 371
  • 1
  • 6
  • 17
  • I am sorry, but JDBC is a big thingy. Can you please provide an MRE? https://stackoverflow.com/help/minimal-reproducible-example – Refael Sheinker Feb 16 '22 at 11:15

1 Answers1

2

JDBC at its essence is a giant instance of the Adapter design pattern. While it may use Dependency Inversion somewhere in its implementation, this isn't what it's essentially about.

ComDubh
  • 793
  • 4
  • 18
  • Can you point out a specific JDBC class that implements the Adapter pattern? – jaco0646 Feb 22 '22 at 14:43
  • I'm not familiar with the details of JDBC, but it maps the high-level API the developer uses to the interface provided by the database, and this essentially is an example of Adaption. – ComDubh Feb 28 '22 at 17:51