This article by @ To stay for the original, reproduced please indicate the source.
Dependency inversion Principle (dependency inversion principle, hereafter referred to as DIP): Do not rely on instances (concrete classes) programming, dependency abstraction (abstractions, refers to dependent abstract classes and interfaces).
understanding of inversion (inversion): usually our high-level components are dependent on the lower component (referred to as a lower-specific instance Class), and dip is not allowed, under the guidance of the dip, we will create an abstract class, so that it is between the high-level components and the lower components, To break this dependency, not only is the high-level component dependent on this abstract class, but the lower component will depend on the abstract class where it is located higher than its upper level, so there will be an "upside down" argument.
Several guidelines for this principle (not necessarily to be sure, just as a reference at the time of development)
1, do not have an application that points to a specific instance (concrete Class) (there is no new in Java).
2, do not have classes derived from specific instances (concrete class).
3, do not overwrite methods already implemented in the parent class.
Dependency inversion Principle (dependency inversion principle)