Search Interview Questions
| 3356 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|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.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  Spring beans  singleton bean scope  prototype bean scope Asked in 1 Companies|
|Difference between Java beans and Spring Beans ?|
|Can we have two beans with same class with different bean id in spring ?|
|Should we have instance variables in the Spring Bean which has been scoped as Singleton ?|
|Which class provides the enumerated value for Bean Scope ?|
|Explain inner beans in Spring.|
|What are the disadvantages of Bean Auto Wiring in Spring ?|