My Report

Spring Mock Test 1


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. Which annotation is used as a substitute of destroy method?

Question 1 of 10

Question 2 of 10

2. Which attribute is used to specify class name of the bean?

Question 2 of 10

Question 3 of 10

3. A)

      public abstract class Product {
	public static final Product AAA = new Battery("AAA", 2.5);
	public static final Product CDRW = new Disc("CD-RW", 1.5);
	...
      }
      <beans ...>
	<bean id="aaa" class="org.springframework.beans.factory.config.
	FieldRetrievingFactoryBean">
	<property name="staticField">
	<value>com.shop.Product.AAA</value>
	</property>
	</bean>
	<bean id="cdrw" class="org.springframework.beans.factory.config.
	FieldRetrievingFactoryBean">
	<property> name="staticField"
	valuecom.shop.Product.CDRW/value
	</property>
	</bean>
     </beans>

   B) Product aaa = com.shop.Product.AAA;
      Product cdrw = com.shop.Product.CDRW;

Question 3 of 10

Question 4 of 10

4. The bean instance is mentioned by the factory-method attribute, while the factory method is signified by the factory-bean attribute?

Question 4 of 10

Question 5 of 10

5. Bean name patterns are supported by all configurations(XML,Java,AspectJ)

Question 5 of 10

Question 6 of 10

6. Which of the following is advice supported by Aspect Annotation?

Question 6 of 10

Question 7 of 10

7. One factory class can also hold more than one factory method True/False?

Question 7 of 10

Question 8 of 10

8. A bean can be requested by:-

Question 8 of 10

Question 9 of 10

9. Which one is the default scope of the beans?

Question 9 of 10

Question 10 of 10

10. Which of the following method can be used to used to instantiate a method?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.