Skip to content
Sharp

Spring Core · interview question

Which annotation is used to define a bean's scope in Spring?

Multiple choiceEasychapter-9-curatedpremiumspring-corebean-scope
Choose one answer
Answer and explanation

Correct answer

A. @Scope

Why

The @Scope annotation is used to define the scope of a Spring bean, such as Singleton, Prototype, Request, or Session.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →