Posted by: Pdfprep
Post Date: January 13, 2021
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
Leave a Reply