
Asked in Visa and 9 others
What is Dependency Injection? Explain with an example.

AnswerBot
2mo
Dependency injection is a design pattern that allows a class to receive its dependencies from an external source rather than creating them itself.
Inversion of Control: Dependency injection promotes lo...read more
john weslie
2y
Dependency injection is a programming technique that makes a class independent of its dependencies
john weslie
2y
Dependency Injection (DI) is a programming technique that makes a class independent of its dependencies. Creating objects directly within the class is inflexible because it commits the class to partic...read more
Add answer anonymously...
Interview Questions from Popular Companies

3.7
• 8.7k Interviews

4.0
• 5.4k Interviews

3.5
• 4.2k Interviews

3.6
• 8k Interviews

3.7
• 6k Interviews

3.7
• 6.2k Interviews

3.5
• 4.2k Interviews

3.7
• 5.1k Interviews
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

