Q: Beans can be created by which of the following properties?
Solution: Class’s constructor can create bean.
Q: Which attribute is used to specify class name of the bean?
Solution: Class attribute is mandatory and denotes the class used to create bean.
Q: Which of the following method can be used to used to instantiate a method?
Solution: Class attribute is used to specify the name of the class that contains the static factory method.
Q: Which attribute is used to specify static factory-method?
Solution: factory-method attribute denotes the name of actual method of the class.
Q: Purpose of Static Factory Method?
Solution: Instantiate a bean using static method.
Q: Exception thrown by factory method?
Solution: Spring generates the above mentioned exception, in case something’s wrong.
Q: Beans can be created by which of the following properties?
Solution: Instantiate a bean via static and instance Factory methods.
Q: Instance Factory method main purpose is to encapsulate the object-creation process in a method of another object instance.
Solution: The client who requests an object can simply make a call to this method without knowing about the creation detail.
Q: One factory class can also hold more than one factory method True/False?
Solution: A single instantiated bean can have more than one methods.
Q: Which Attribute is used to specify the bean declared?
Solution: To declare a bean created by an instance factory method, you specify the bean hosting the factory method in the factory-bean attribute.
You Have Score    | /10 |