adspace


Why we are using dependency injection?

Answer Posted / Jyoti Agnihotri

We use dependency injection to make our code more modular, testable, and easier to maintain. It promotes loose coupling between components in our application by allowing us to separate the concerns of object creation and management from the business logic.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between @controller and @restcontroller in spring?

556


What is lazy class?

490


How can you inject java collection in spring?

518