intive interview question

can you explain what Injection Dependency is?

Interview Answer

Anonymous

25 Apr 2023

Dependency injection is used to make a class independent of its dependencies or to create a loosely coupled program. Dependency injection is useful for improving the reusability of code. Likewise, by decoupling the usage of an object, more dependencies can be replaced without needing to change class.