Answer :

Answer:

Constructor Injection

Setter Injection

Method Injection

Explanation:

Dependency Injection is to inject all the dependencies required for a class to make it a loosely coupled component from it's dependencies. As the class is loosely coupled from it's dependencies ,changing the logic of dependencies wont effect the class any more.

Constructor Injection: we can inject all the dependencies of the class using constructor

Setter Injection : we will create some properties which will set and return the dependencies of the class

Method Injection: we will create separate method to inject dependencies into the class

Other Questions