| |
GeekInterview.com > Interview Questions > J2EE > Spring
| Print | |
Question: dependency injection
Answer: what is dependency injection ?? |
| July 07, 2008 03:20:27 |
#6 |
| rajeevchaturvedi2007 |
Member Since: February 2008 Total Comments: 1 |
RE: dependency injection |
Dependency injection is the ability to inject collobrative objects dynamically.Suppose you want to call a method of particular class, so for that you use new operator help and make object of that class and call the require method using ref. varibale of that class .But when you use Spring dependency injection , you don't have to do all these stuff, instead of that you configure a xml file in which you mention what all objects you require in you class, it will get ready for use. You don't have to create or instantiate .
cheers
Rajeev Chaturvedi |
| |
Back To Question | |