InterviewSolution
Saved Bookmarks
| 1. |
What do you mean by dependency injection and how does it work? |
|
Answer» Dependency Injection or DI is a DESIGN pattern that implements inversion or change of control for resolving dependencies. It is a process through which OBJECTS define their dependencies. Transferring the task of creating objects to someone ELSE and using the dependency is CALLED dependency injection. It can be done in 2 ways: constructor-based DI and setter-based DI. |
|