
Let’s
think of a scenario where you are having the fever, you go to a medical
shop and ask for medicine but then in return, the medical guy asked
which or what type of medicine you need. Ooopz!! Now what? You land up
visiting the doctor who understands your needs and writes down the
medicine which would work for you. Amazing!! Isn’t it. You got your work
done with just a call of service. And that’s what Dependency Injection
is.