Dependency inversion means the compile-time dependency between two modules is the opposite of the runtime dependency. By defining an interface in module A that module B implements, B depends on A at compile time rather than the other way around. This decouples the modules so that B can be updated without recompiling A. The JDBC API is a real-world example of this pattern, where the API defines interfaces that database-specific drivers implement.

1m watch time

Sort: