2V0-72.22PSE · Question #70
Which three statements are advantages of using Spring's Dependency Injection? (Choose three.)
The correct answer is C. Dependencies between application components can be managed external to the components. D. Configuration can be externalized and centralized in a small set of files. F. Dependency injection facilitates loose coupling between components. Spring's Dependency Injection (DI) is correct for C, D, and F because DI externalizes the wiring of components so that dependencies are declared and managed outside the components themselves (C), configuration can live in XML, YAML, or annotation-based files separate from…
Question
Which three statements are advantages of using Spring's Dependency Injection? (Choose three.)
Options
- ADependency injection can make code easier to trace because it couples behavior with
- BDependency injection reduces the start-up time of an application.
- CDependencies between application components can be managed external to the components.
- DConfiguration can be externalized and centralized in a small set of files.
- EDependency injection creates tight coupling between components.
- FDependency injection facilitates loose coupling between components.
How the community answered
(43 responses)- A5% (2)
- B2% (1)
- C91% (39)
- E2% (1)
Explanation
Spring's Dependency Injection (DI) is correct for C, D, and F because DI externalizes the wiring of components so that dependencies are declared and managed outside the components themselves (C), configuration can live in XML, YAML, or annotation-based files separate from business logic (D), and components depend on abstractions rather than concrete implementations, producing loose coupling (F).
Why the distractors fail:
- A is backwards - DI actually decouples behavior, making traces harder, not easier, because call paths flow through the container rather than direct instantiation.
- B is false - DI typically increases startup time because the container must scan, wire, and initialize all beans at boot.
- E is the exact opposite of DI's purpose; tight coupling is what DI is designed to eliminate.
Memory tip: Think of DI as a "restaurant menu" model - the kitchen (container) manages ingredient sourcing (C) from a centralized recipe book (D), and your dish doesn't care which farm grew the vegetables, only that they arrive (loose coupling = F). Any answer implying DI makes things harder to follow or slower to start is a trap.
Topics
Community Discussion
No community discussion yet for this question.