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

Answer : A

Explanation

Dependency Injection is a design pattern which implements Inversion of Control for software applications.

Answer : D

Explanation

All of the above statements are correct.

Answer : C

Explanation

<map> tag is used to inject a collection of name-value pairs where name and value can be of any type.

Answer : A

Explanation

Using Bean autowiring, Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory without using <constructor-arg> and <property> elements..

Answer : D

Explanation

Spring supports all the mentioned ORMs.

Q 8 - Expression Language/ SpEL was introduced in which version of spring framework.

A - 1.0

B - 2.0

C - 3.0

D - 4.0

Answer : C

Explanation

Expression Language/ SpEL was introduced in 3.0 version of spring framework.

Answer : D

Explanation

Life cycle of a bean can be controlled using init() method or using InitializingBean / DisposableBean classes.

Q 10 - Can we inject value and ref both together in a bean?

A - True

B - False

Answer : A

Explanation

Both values and ref can be injected at a time in a bean.

spring_questions_answers.htm
Advertisements