- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 is the way to provide configuration metadata to spring?
A - XML Based configuration file.
Answer : D
Explanation
All of the above statements are correct.
Q 3 - What is session scope?
A - This scopes a bean definition to an HTTP session.
B - This scopes the bean definition to Spring IoC container.
C - This scopes the bean definition to HTTP request.
D - This scopes the bean definition to HTTP Application/ Global session.
Answer : A
Explanation
session scope instructs Spring IoC container to create a instance per HTTP session.
Q 4 - Which are the different modes of autowiring?
A - no, byName, byType, constructor, autodetect
B - no, byName, byType, constructor, autocorrect
Answer : A
Explanation
Autowiring modes are five: no, byName, byType, constructor, autodetect.
Q 5 - What is ContextStartedEvent event?
A - This event is published when the Servlet Context is either initialized or refreshed.
B - This event is published when the HTTP Request is received.
D - This event is published when the HTTP Response is returned.
Answer : C
Explanation
ContextStartedEvent event is published when the ApplicationContext is started using the start() method on the ConfigurableApplicationContext interface.
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 - Which of the following is part of Data Access layer in Spring framework?
Answer : C
Explanation
JMS is the part of Data Access layer in Spring framework.
Q 8 - What stands true for spring framework?
Answer : A
Explanation
Spring framework is a light weight framework.
Q 9 - How to handle shut down of IoC container?
Answer : D
Explanation
Using registerShutdownHook() method, shut down of IoC container can be handled. Other methods do not exists.
Q 10 - What is ACID in transactional management?
A - Accurate, Controlled, Isolation, Durability
B - Atomicity, Consistency, Independent, Done
Answer : C
Explanation
ACID stands for Atomicity, Consistency, Isolation, Durability.