Posted by: Pdfprep
Post Date: December 13, 2020
Which statement is true with regards to the above example? (select one)
ClientService service = applicationContext.getBean(ClientService.class)
A . It returns the bean called "ClientService"
B . It returns a bean of the type ClientService (regardless of its id or name)
C . This syntax is not valid because the bean id must be specified as a method param
D . This syntax is not valid because the result of the getBean method should be explicitely cast into ClientService
Answer: B
Leave a Reply