Which statement is true about the two references returned?

Two beans of type MyBean are defined in the ApplicationContext with singleton scope, with ids "myBean1" and "myBean2". The getBean() method is called once for each bean.

Which statement is true about the two references returned? (Select one)
A . The two references refer to different instances of the same type
B . Both references refer to the same bean instance
C . One of the references will be null
D . A RuntimeException will be thrown when the ApplicationContext is initialized

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments