- Spring - Home
- Spring - Overview
- Spring - Architecture
- Spring - Environment Setup
- Spring - Hello World Example
- Spring - IoC Containers
- Spring - Bean Definition
- Spring - Bean Scopes
- Spring - Bean Life Cycle
- Spring - Bean Post Processors
- Spring - Bean Definition Inheritance
- Spring - Dependency Injection
- Spring - Injecting Inner Beans
- Spring - Injecting Collection
- Spring - Beans Auto-Wiring
- Annotation Based Configuration
- Spring - Java Based Configuration
- Spring - Event Handling in Spring
- Spring - Custom Events in Spring
- Spring - AOP with Spring Framework
- Spring - JDBC Framework
- Spring - Transaction Management
- Spring - Web MVC Framework
- Spring - Logging with Log4J
Spring Useful Resources
Spring Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Spring Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the statement is not correct?
Answer : D
Explanation
All of the above statements are correct.
Q 2 - Which of the statement is correct?
C - The Java Messaging Service JMS module contains features for producing and consuming messages.
Answer : D
Explanation
All of the above statements are correct.
Q 3 - What is true about <list> collection configuration elements?
A - This helps in wiring a list of values, allowing duplicates.
B - This helps in wiring a list of values but without any duplicates.
Answer : A
Explanation
<list> tag is used to wire a list of values, allowing duplicates.
Q 4 - What is constructor mode of autowiring?
Answer : D
Explanation
Constructor mode of autowiring is similar to byType, but type applies to constructor arguments. If there is not exactly one bean of the constructor argument type in the container, a fatal error is raised.
Q 5 - What is true about @Autowired annotation?
A - The @Autowired annotation can be used to autowire bean on the setter method.
Answer : B
Explanation
@Autowired annotation provides more fine-grained control over where and how autowiring should be accomplished.
Q 6 - How before advice works?
A - Run advice before a class loads.
B - Run advice before a method execution.
Answer : B
Explanation
before advice runs before a method execution.
Q 7 - What is @Controller annotation?
A - The @Controller annotation indicates that a particular class serves the role of a controller.
B - The @Controller annotation indicates how to control the transaction management.
C - The @Controller annotation indicates how to control the dependency injection.
D - The @Controller annotation indicates how to control the aspect programming.
Answer : A
Explanation
The @Controller annotation indicates that a particular class serves the role of a controller.
Q 8 - If a bean is scoped to HTTP request, scope is
Answer : D
Explanation
If a bean is scoped to HTTP request, scope is request.
Q 9 - Which class is used to map a database row to a java object in spring?
Answer : B
Explanation
RowMapper class is used to map a database row to a java object in spring.
Q 10 - Where do you define DispatcherServlet?
Answer : B
Explanation
DispatcherServlet is defined in web.xml of web application.