Skip to content
Sharp

Spring Core · interview question

Which Spring Bean scope is most appropriate for a stateful object in a web application?

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

Correct answer

C. Session

Why

The Session scope is appropriate for stateful objects per user in a web application. Each user will have their own instance of the bean for the duration of their session.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →