What is the default scope?

Spring puts each bean instance in a scope.

What is the default scope? (Choose the best answer.)
A . prototype
B . singleton
C . request
D . session

Answer: B

Explanation:

Spring supports different scopes for bean instances, such as singleton, prototype, request, session, etc. The scope determines how many instances of a bean are created and how they are shared among other components. The default scope is singleton, which means that only one instance of a bean is created per application context and it is shared by all components that depend on it.

Reference: https://stackoverflow.com/questions/17599216/spring-bean-scopes

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments