![Spring Tutorial](/spring/images/spring-mini-logo.jpg)
- Spring Core Basics
- 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 Questions and Answers
- Spring - Questions and Answers
- Spring Useful Resources
- Spring - Quick Guide
- Spring - Useful Resources
- Spring - Discussion
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.
![Questions and Answers](/images/questions_and_answers.png)
Q 1 - Which are the modules of core container?
A - Beans, Core, Context, SpEL
Answer : A
Explanation
Beans, Core, Context, SpEL are the modules in core container.
Q 2 - Which are the IoC containers in Spring?
A - BeanFactory, ApplicationContext
B - BeanFactory, ApplicationContext, IocContextFactory
Answer : A
Explanation
BeanFactory, ApplicationContext classes acts as IoC containers in Spring.
Q 3 - What is default scope of bean in Spring framework?
Answer : A
Explanation
singleton is the default scope of any spring bean.
Q 4 - What is autodetect mode of autowiring?
Answer : C
Explanation
In autodetect mode of autowiring spring first tries to wire using autowire by constructor, if it does not work, Spring tries to autowire by byType.
Q 5 - What is Pointcut?
A - This represents a point in your application where you can plug-in AOP aspect.
B - This is a set of one or more joinpoints where an advice should be executed.
C - This is used to inject values in objects.
D - This is invoked during program execution by Spring AOP framework.
Answer : B
Explanation
Pointcut is a set of one or more joinpoints where an advice should be executed.
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 are the types of the transaction management Spring supports?
A - Programmatic transaction management
Answer : C
Explanation
Spring supports both Programmatic and Declarative transaction management.
Answer : B
Explanation
By default a bean is eagerly loaded.
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.
Answer : A
Explanation
A bean can be configured to have an inner bean.
To Continue Learning Please Login