Skip to content
Sharp

Spring Core · interview question

In what scenario is it beneficial to use a Prototype scope bean over a Singleton in Spring Boot?

Multiple choiceHardchapter-9-curatedpremiumspring-coredtos-and-entities
Choose one answer
Answer and explanation

Correct answer

B. When each HTTP request needs a unique instance.

Why

Prototype scope is beneficial when each HTTP request or operation requires a unique instance of a bean, ensuring each use gets a fresh instance.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →