Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Spring - Interview Questions and Answers for 'Prototype bean scope' - 2 question(s) found - Order By Newest | ||||
| ||||
Ans. Prototype scope - A new object is created each time it is injected/looked up. It will use new SomeClass() each time. Singleton scope - It is the default scope. The same object is returned each time it is injected/looked up. Here it will instantiate one instance of SomeClass and then return it each time. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. Default Bean scope in auto wiring is Singleton but Yes, that can be changed by specifying the Bean scope explicitly. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||