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
Correct Answer:
Verified
Q3: Which of the following statements about the
Q4: Which of the following statements about the
Q5: ClientService service = applicationContext.getBean(ClientService.class) Which statement is
Q6: Which of the following statements about use
Q7: Which of the following statements is NOT
Q9: Given an ApplicationContext containing multiple bean definitions
Q10: import com.springsource.service.*; ... @Configuration public class AppConfig
Q11: Which of the following statements is NOT
Q12: Using Spring AOP, which of the following
Q13: Which of the following statements about Spring's
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents