How can a bean of type LegacySingleton be created (using XML configuration)? (select one)
How can a bean of type LegacySingleton be created (using XML configuration)? (select one)
Consider the following class:
public class LegacySingleton {
private LegacySingleton(){}
public static LegacySingleton getAServiceInstance() {
return new LegacySingleton();
}
}
A . It is not possible, the constructor must be public
B . Use the factory-method attribute on the <bean> tag
C . Use the init-method attribute on the <bean> tag
D . Use autowiring
Answer: B
Latest CoreSpringV3.2 Dumps Valid Version with 97 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments