- 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.
Answer : A
Explanation
AOP stands for Aspect Oriented Programming.
Q 2 - What is bean scope?
A - Bean scope forces Spring to produce a new bean instance as per the scope defined.
B - Bean scope defines the accessibility of bean in a java class.
C - Bean scope defines the accessibility of bean in a java package.
D - Bean scope defines the accessibility of bean in a web application.
Answer : A
Explanation
Bean scope instructs Spring Container to produce a new bean instance as per the scope defined.
Q 3 - What is true about <map> 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 : C
Explanation
<map> tag is used to inject a collection of name-value pairs where name and value can be of any type.
Q 4 - What is no mode of autowiring?
A - Default setting which means no autowiring and you should use explicit bean reference for wiring.
B - Autowiring by property name.
D - Similar to byType, but type applies to constructor arguments.
Answer : A
Explanation
no mode of autowiring is the default mode which means no autowiring and you should use explicit bean reference for wiring.
Q 5 - What is aspect?
A - Aspect is a way to do the dependency injection.
B - A module which has a set of APIs providing cross-cutting requirements.
C - Aspect is used to log information of application.
D - Aspect represents properties of spring based application.
Answer : B
Explanation
aspect module has a set of APIs to provide cross-cutting requirements.
Q 6 - What is Target object?
A - A represents a object in your application where you can plug-in AOP aspect.
C - This is used to inject values in objects.
D - This is not invoked during program execution by Spring AOP framework.
Answer : B
Explanation
Target object is advised by one or more aspects. Target object will always be a proxy object, also referred to as the advised object.
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 - 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 - If a bean can be created any number of times, scope is
Answer : C
Explanation
In prototype scope, a bean can be created any number of times.
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.
To Continue Learning Please Login
Login with Google