- 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.
Q 1 - Which are the modules of Data Access/ integration layer?
Answer : A
Explanation
JDBC, ORM, OXM, JMS, Transactions are the modules of Data Access/ Integration layer.
Q 2 - Which is the correct implementation class of BeanFactory?
Answer : A
Explanation
XmlBeanFactory is the implementation class of BeanFactory. Other mentioned classes do not exists.
Q 3 - What is true about <set> 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 : B
Explanation
<set> tag is used to wire a list of values, but without any duplicates.
Answer : A
Explanation
null and empty string values can be injected in spring beans.
Q 5 - What is Advice?
A - This is the way to instruct object to behave in certain manner.
B - This is used to inject values in objects.
C - This is the actual action to be taken either before or after the method execution.
D - This is not invoked during program execution by Spring AOP framework.
Answer : C
Explanation
Advice is the actual action to be taken either before or after the method execution.
Q 6 - What are the different points where weaving can be applied?
Answer : D
Explanation
Weaving can be applied at Compile time, load Time and Run time.
Answer : B
Explanation
AOP is not the part of spring core container.
Answer : B
Explanation
By default a bean is eagerly loaded.
Q 9 - What is the scope of bean in portlet context?
Answer : B
Explanation
Scope of bean in portlet context is global-session.
Q 10 - Which of the following class can be used to execute Sql queries in spring?
Answer : B
Explanation
JdbcTemplate class can be used to execute Sql queries in spring.