Skip to content
Sharp

Spring Core · interview question

Why does the @Autowired annotation in Spring matter in this design?

Multiple choiceEasychapter-9-curatedpremiumspring-coreinversion-of-control-ioc
Choose one answer
Answer and explanation

Correct answer

C. To automatically wire bean dependencies.

Why

The @Autowired annotation is used in Spring to automatically inject bean dependencies into a class, allowing Spring to resolve and inject collaborating beans at runtime.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →